From 8a0efec1a0416144799bb17df4285a26ba358562 Mon Sep 17 00:00:00 2001 From: jeffcarp Date: Thu, 8 Dec 2016 14:21:59 -0800 Subject: [PATCH] Add tests for fullscreenchange and fullscreenerror event timing Although HTML does not yet define animation frame tasks as used by Fullscreen, it does have "run the fullscreen rendering steps". That's the old hook, making the timing of these events relative to resize and animation frame callbacks unambiguous: https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen https://html.spec.whatwg.org/multipage/webappapis.html#event-loop-processing-model Spec issue: https://github.com/whatwg/html/issues/707 document-exit-fullscreen-timing-manual.html consistently matches -expected.txt, with (accidentally) correct timing but no resize event. element-request-fullscreen-timing-manual.html usually matches -expected.txt, with incorrect timing, but can accidentally get the timing right and instead fail due to no resize event. Both are marked as flaky to be safe, and will be enabled in a coming CL. Note: This CL is also a test for the WPT export process. Firefox passes both fullscreechange event tests, but fails the fullscreenerror test. (Implementation preceded spec changes.) BUG=402376,672436 Review-Url: https://codereview.chromium.org/2564543002 Cr-Commit-Position: refs/heads/master@{#437283} --- ...exit-fullscreen-timing-manual-expected.txt | 4 ++ ...ocument-exit-fullscreen-timing-manual.html | 33 +++++++++++++++++ ...uest-fullscreen-timing-manual-expected.txt | 5 +++ ...ment-request-fullscreen-timing-manual.html | 37 +++++++++++++++++++ 4 files changed, 79 insertions(+) create mode 100644 fullscreen/api/document-exit-fullscreen-timing-manual-expected.txt create mode 100644 fullscreen/api/document-exit-fullscreen-timing-manual.html create mode 100644 fullscreen/api/element-request-fullscreen-timing-manual-expected.txt create mode 100644 fullscreen/api/element-request-fullscreen-timing-manual.html diff --git a/fullscreen/api/document-exit-fullscreen-timing-manual-expected.txt b/fullscreen/api/document-exit-fullscreen-timing-manual-expected.txt new file mode 100644 index 000000000000000..1a274d04720f8a4 --- /dev/null +++ b/fullscreen/api/document-exit-fullscreen-timing-manual-expected.txt @@ -0,0 +1,4 @@ +This is a testharness.js-based test. +FAIL Timing of fullscreenchange and resize events assert_array_equals: event order lengths differ, expected 2 got 1 +Harness: the test ran to completion. + diff --git a/fullscreen/api/document-exit-fullscreen-timing-manual.html b/fullscreen/api/document-exit-fullscreen-timing-manual.html new file mode 100644 index 000000000000000..f91eb7e2a769061 --- /dev/null +++ b/fullscreen/api/document-exit-fullscreen-timing-manual.html @@ -0,0 +1,33 @@ + +Document#exitFullscreen() timing + + + +
+ diff --git a/fullscreen/api/element-request-fullscreen-timing-manual-expected.txt b/fullscreen/api/element-request-fullscreen-timing-manual-expected.txt new file mode 100644 index 000000000000000..3fd3954038e0360 --- /dev/null +++ b/fullscreen/api/element-request-fullscreen-timing-manual-expected.txt @@ -0,0 +1,5 @@ +This is a testharness.js-based test. +FAIL Timing of fullscreenchange and resize events assert_unreached: timer callback Reached unreachable code +PASS Timing of fullscreenerror event +Harness: the test ran to completion. + diff --git a/fullscreen/api/element-request-fullscreen-timing-manual.html b/fullscreen/api/element-request-fullscreen-timing-manual.html new file mode 100644 index 000000000000000..f92b4f6292898d1 --- /dev/null +++ b/fullscreen/api/element-request-fullscreen-timing-manual.html @@ -0,0 +1,37 @@ + +Element#requestFullscreen() timing + + + +
+