зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1486894 [wpt PR 12728] - Fix fullscreen WPT tests assuming fullscreenElement changes each time., a=testonly
Automatic update from web-platform-testsFix fullscreen WPT tests assuming fullscreenElement changes each time. Since fullscreenchange event is sent by the rAF event loop it is possible that the fullscreenElement might change and not be observed at the time you read the event. Fix the tests so they are robust. Fix the ordering of which fullscreen elements are handled in pending frames. Otherwise we might end up with incorrect ordering. BUG=874444 Change-Id: I00c228e0aea7794564e522a3883573ea359235f1 Reviewed-on: https://chromium-review.googlesource.com/1194726 Commit-Queue: Dave Tapuska <dtapuska@chromium.org> Reviewed-by: Philip Jägenstedt <foolip@chromium.org> Cr-Commit-Position: refs/heads/master@{#587170} -- wpt-commits: 9be7cfef2e90378b3db6d6e75b80ba6f929786c5 wpt-pr: 12728
This commit is contained in:
Родитель
e50e656603
Коммит
066d24eead
|
@ -591142,11 +591142,11 @@
|
|||
"manual"
|
||||
],
|
||||
"fullscreen/api/element-request-fullscreen-two-elements-manual.html": [
|
||||
"9611c8165663f8e633be20c2e34fb8b04378a44e",
|
||||
"3291664c63ab4880dd844e5f75046d2f93c8f92f",
|
||||
"manual"
|
||||
],
|
||||
"fullscreen/api/element-request-fullscreen-two-iframes-manual.html": [
|
||||
"99a7672e71c9617f1b73c87d6dcfe694f23563a4",
|
||||
"94b38c0302a5fa32f72dd63c505cf0b73d7e6a73",
|
||||
"manual"
|
||||
],
|
||||
"fullscreen/api/historical.html": [
|
||||
|
|
|
@ -19,8 +19,11 @@ async_test(t => {
|
|||
assert_in_array(document.fullscreenElement, [a, b]);
|
||||
order.push(document.fullscreenElement.id);
|
||||
if (order.length == 2) {
|
||||
assert_array_equals(order, ['b', 'a'],
|
||||
'fullscreenElement IDs in fullscreenchange events');
|
||||
// Since fullscreenchange event occurs at animation frame timing we might
|
||||
// have not seen the transition from null -> 'b' but just see the
|
||||
// resulting 'a' transition twice.
|
||||
assert_true(order[0] == 'a' || order[0] == 'b', 'first id seen is a or b');
|
||||
assert_true(order[1] == 'a', 'second id seen is b');
|
||||
t.done();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -21,8 +21,11 @@ async_test(t => {
|
|||
assert_in_array(document.fullscreenElement, [a, b]);
|
||||
order.push(document.fullscreenElement.id);
|
||||
if (order.length == 2) {
|
||||
assert_array_equals(order, ['b', 'a'],
|
||||
'fullscreenElement IDs in fullscreenchange events');
|
||||
// Since fullscreenchange event occurs at animation frame timing we might
|
||||
// have not seen the transition from null -> 'b' but just see the
|
||||
// resulting 'a' transition twice.
|
||||
assert_true(order[0] == 'a' || order[0] == 'b', 'first id seen is a or b');
|
||||
assert_true(order[1] == 'a', 'second id seen is b');
|
||||
t.done();
|
||||
}
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче