Bug 1528700 [wpt PR 15385] - [Screen Orientation] Fix: add requestFullscreen to onchange-event.html, a=testonly
authorJohanna <Johanna-hub@users.noreply.github.com>
Tue, 05 Mar 2019 12:13:43 +0000
changeset 464537 6e9781f5e50fcc01521827c5743aec051ffd6a3d
parent 464536 b172a1750aecc02b5489415c7b78474918a5f236
child 464538 e62189593f435ecfc20424de84d5b98a1284a75d
push id35717
push useraciure@mozilla.com
push dateSun, 17 Mar 2019 09:45:26 +0000
treeherdermozilla-central@e0861be8d6c0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1528700, 15385
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1528700 [wpt PR 15385] - [Screen Orientation] Fix: add requestFullscreen to onchange-event.html, a=testonly Automatic update from web-platform-tests Fix: add requestFullscreen (#15385) -- wpt-commits: 0db395ed1acb636ab0fa2686944a46d038d073d4 wpt-pr: 15385
testing/web-platform/tests/screen-orientation/onchange-event.html
--- a/testing/web-platform/tests/screen-orientation/onchange-event.html
+++ b/testing/web-platform/tests/screen-orientation/onchange-event.html
@@ -1,20 +1,27 @@
 <!DOCTYPE html>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script>
 promise_test(async t => {
+  await test_driver.bless("request full screen", () => {
+    return document.documentElement.requestFullscreen();
+  });
   const type = screen.orientation.type;
   screen.orientation.onchange = t.unreached_func("change event should not be fired");
   await screen.orientation.lock(type);
   assert_equals(screen.orientation.type, type);
+  return document.exitFullscreen();
 }, "Test that orientationchange event is not fired when the orientation does not change.");
 
 promise_test(async t => {
+  await test_driver.bless("request full screen", () => {
+    return document.documentElement.requestFullscreen();
+  });
   let orientations = [
     'portrait-primary',
     'portrait-secondary',
     'landscape-primary',
     'landscape-secondary'
   ];
   if (screen.orientation.type.includes('portrait')) {
     orientations = orientations.reverse();
@@ -22,10 +29,11 @@ promise_test(async t => {
   const orientationWatcher = new EventWatcher(t, screen.orientation, 'change');
 
   for (const orientation of orientations) {
     await screen.orientation.lock(orientation);
     await orientationWatcher.wait_for('change');
     assert_equals(screen.orientation.type, orientation);
   }
   screen.orientation.unlock();
+  return document.exitFullscreen();
 }, "Test that orientationchange event is fired when the orientation changes.");
 </script>