mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-12 23:12:21 +00:00
Bug 1411806 - Update test descriptions for document timeline tests; r=hiro
Now that some of these tests have been moved to the timing-model directory, it makes less sense to refer to the actual API being tested. Intead they should refer to the concept in the model being tested. MozReview-Commit-ID: 7Y65o0IilSq --HG-- extra : rebase_source : 08bfaab755fd24d59d6aa6f9410fc1364efb5860
This commit is contained in:
parent
0ad3fe126d
commit
08c9a5ba59
@ -12,12 +12,12 @@
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.timeline, document.timeline,
|
||||
'document.timeline returns the same object every time');
|
||||
'Document.timeline returns the same object every time');
|
||||
const iframe = document.getElementById('iframe');
|
||||
assert_not_equals(document.timeline, iframe.contentDocument.timeline,
|
||||
'document.timeline returns a different object for each document');
|
||||
'Document.timeline returns a different object for each document');
|
||||
assert_not_equals(iframe.contentDocument.timeline, null,
|
||||
'document.timeline on an iframe is not null');
|
||||
}, 'document.timeline identity tests');
|
||||
'Document.timeline on an iframe is not null');
|
||||
}, 'Document.timeline returns the default document timeline');
|
||||
|
||||
</script>
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
async_test(function(t) {
|
||||
assert_true(document.timeline.currentTime > 0,
|
||||
'document.timeline.currentTime is positive');
|
||||
'The current time is initially is positive');
|
||||
// document.timeline.currentTime should be set even before document
|
||||
// load fires. We expect this code to be run before document load and hence
|
||||
// the above assertion is sufficient.
|
||||
@ -28,11 +28,10 @@ async_test(function(t) {
|
||||
window.requestAnimationFrame(function(rafTime) {
|
||||
t.step(function() {
|
||||
assert_equals(document.timeline.currentTime, rafTime,
|
||||
'document.timeline.currentTime matches' +
|
||||
' requestAnimationFrame time');
|
||||
'The current time matches requestAnimationFrame time');
|
||||
});
|
||||
t.done();
|
||||
});
|
||||
}, 'document.timeline.currentTime value tests');
|
||||
}, 'Document timelines report current time relative to navigationStart');
|
||||
|
||||
</script>
|
||||
|
@ -16,12 +16,12 @@ promise_test(function(t) {
|
||||
// Wait 50ms
|
||||
}
|
||||
assert_equals(document.timeline.currentTime, valueAtStart,
|
||||
'document.timeline.currentTime does not change within a script block');
|
||||
'Timeline time does not change within an animation frame');
|
||||
return waitForAnimationFrames(1).then(function() {
|
||||
assert_greater_than(document.timeline.currentTime, valueAtStart,
|
||||
'document.timeline.currentTime increases between script blocks');
|
||||
'Timeline time increases between animation frames');
|
||||
});
|
||||
}, 'document.timeline.currentTime liveness tests');
|
||||
}, 'Timeline time increases once per animation frame');
|
||||
|
||||
async_test(function(t) {
|
||||
const iframe = document.createElement('iframe');
|
||||
@ -36,18 +36,18 @@ async_test(function(t) {
|
||||
// Wait 50ms
|
||||
}
|
||||
assert_equals(iframeTimeline.currentTime, valueAtStart,
|
||||
'iframe document.timeline.currentTime does not change within a '
|
||||
+ ' script block');
|
||||
'Timeline time within an iframe does not change within an '
|
||||
+ ' animation frame');
|
||||
|
||||
iframe.contentWindow.requestAnimationFrame(t.step_func_done(() => {
|
||||
assert_greater_than(iframeTimeline.currentTime, valueAtStart,
|
||||
'iframe document.timeline.currentTime increases between script blocks');
|
||||
'Timeline time within an iframe increases between animation frames');
|
||||
iframe.remove();
|
||||
}));
|
||||
}));
|
||||
|
||||
document.body.appendChild(iframe);
|
||||
}, 'iframe document.timeline.currentTime liveness tests');
|
||||
}, 'Timeline time increases once per animation frame in an iframe');
|
||||
|
||||
async_test(function(t) {
|
||||
const startTime = document.timeline.currentTime;
|
||||
@ -56,7 +56,7 @@ async_test(function(t) {
|
||||
requestAnimationFrame(function() {
|
||||
t.step(function() {
|
||||
assert_greater_than_equal(document.timeline.currentTime, startTime,
|
||||
'currentTime should have progressed');
|
||||
'Timeline time should have progressed');
|
||||
firstRafTime = document.timeline.currentTime;
|
||||
});
|
||||
});
|
||||
@ -64,11 +64,11 @@ async_test(function(t) {
|
||||
requestAnimationFrame(function() {
|
||||
t.step(function() {
|
||||
assert_equals(document.timeline.currentTime, firstRafTime,
|
||||
'currentTime should be the same');
|
||||
'Timeline time should be the same');
|
||||
});
|
||||
t.done();
|
||||
});
|
||||
}, 'document.timeline.currentTime time should be the same for all RAF'
|
||||
+ ' callbacks in a frame');
|
||||
}, 'Timeline time should be the same for all RAF callbacks in an animation'
|
||||
+ ' frame');
|
||||
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user