Bug 1528058 [wpt PR 15378] - [Screen Orientation] Fix: add requestFullscreen to lock-basic, a=testonly
authorJohanna <Johanna-hub@users.noreply.github.com>
Tue, 05 Mar 2019 12:13:45 +0000
changeset 464538 e62189593f43
parent 464537 6e9781f5e50f
child 464539 1c69ba77f5c9
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
bugs1528058, 15378
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 1528058 [wpt PR 15378] - [Screen Orientation] Fix: add requestFullscreen to lock-basic, a=testonly Automatic update from web-platform-tests [Screen Orientation] Fix: add requestFullscreen to lock-basic (#15378) -- wpt-commits: 0f05661c8e441416e314cc6c5779671d29c81a09 wpt-pr: 15378
testing/web-platform/tests/screen-orientation/lock-basic.html
--- a/testing/web-platform/tests/screen-orientation/lock-basic.html
+++ b/testing/web-platform/tests/screen-orientation/lock-basic.html
@@ -1,27 +1,36 @@
 <!DOCTYPE html>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
 <script>
 test(() => {
   screen.orientation.unlock();
 }, "Test that screen.orientation.unlock() doesn't throw when there is no lock");
 
 test(() => {
   const value = screen.orientation.unlock();
   assert_equals(value, undefined);
 }, "Test that screen.orientation.unlock() returns a void value");
 
 promise_test(async t => {
+  await test_driver.bless("request full screen", () => {
+    return document.documentElement.requestFullscreen();
+  });
   const value = await screen.orientation.lock('any');
   assert_equals(value, undefined);
+  return document.exitFullscreen();
 }, "Test that screen.orientation.lock returns a promise which will be fulfilled with a void value.");
 
 promise_test(async t => {
+  await test_driver.bless("request full screen", () => {
+    return document.documentElement.requestFullscreen();
+  });
   const orientations = [
     'any',
     'natural',
     'portrait',
     'landscape',
     'portrait-secondary',
     'landscape-primary',
     'landscape-secondary',
@@ -45,20 +54,25 @@ promise_test(async t => {
       assert_true(type == "landscape-primary" || type == "landscape-secondary");
       break;
     default:
       assert_equals(type, orientation, "Expected orientation to change");
       break;
     }
   }
   screen.orientation.unlock();
+  return document.exitFullscreen();
 }, "Test that screen.orientation.lock returns a pending promise.");
 
 promise_test(async t => {
+  await test_driver.bless("request full screen", () => {
+    return document.documentElement.requestFullscreen();
+  });
   const preType = screen.orientation.type;
   const isPortrait = preType.includes("portrait");
   const newType = `${ isPortrait ? "landscape" : "portrait" }-primary`;
   const p = screen.orientation.lock(newType);
   assert_equals(screen.orientation.type, preType, "Must not change orientation until next spin of event loop");
   await p;
   assert_equals(screen.orientation.type, newType);
+  return document.exitFullscreen();
 }, "Test that screen.orientation.lock() is actually async");
 </script>