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 522155 9e73b2eb508fa1a46770a422f0093f7ccd284e54
parent 522154 d3e10f10f4c2acb28ce6ee88930c55f5d2c0c809
child 522156 0562ba7637c2f9326f482cd69b2c3f8d8019be83
push id10871
push usercbrindusan@mozilla.com
push dateMon, 18 Mar 2019 15:49:32 +0000
treeherdermozilla-beta@018abdd16060 [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>