Bug 1312417 - Remove test_orientation_sandbox_no_lock.html and friends as they aren't used and have invalid js. r=baku
authorMark Banner <standard8@mozilla.com>
Thu, 11 Oct 2018 12:50:36 +0000
changeset 499185 3a7632140ea5c04fed23b206f3dacf8e83719e86
parent 499184 eaf50a59155d0bef730fc4b48038589297860fc2
child 499186 7d8d3fc3e9f433e4aa967341a5f7ac649191b044
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1312417
milestone64.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 1312417 - Remove test_orientation_sandbox_no_lock.html and friends as they aren't used and have invalid js. r=baku Differential Revision: https://phabricator.services.mozilla.com/D8211
dom/base/test/file_lock_orientation.html
dom/base/test/mochitest.ini
dom/base/test/orientationcommon.js
dom/base/test/test_orientation_alternate.html
dom/base/test/test_orientation_frame.html
dom/base/test/test_orientation_frame_lock.html
dom/base/test/test_orientation_sandbox_no_lock.html
dom/base/test/test_window_orientation.html
deleted file mode 100644
--- a/dom/base/test/file_lock_orientation.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body>
-<script src="orientationcommon.js"></script>
-<script>
-window.addEventListener("message", function(event) {
-  var p = specialPowersLock(event.data);
-  p.then(function() {
-    event.source.postMessage("success", "*");
-  }).catch(function(err) {
-    event.source.postMessage("error", "*");
-  });
-});
-</script>
--- a/dom/base/test/mochitest.ini
+++ b/dom/base/test/mochitest.ini
@@ -142,17 +142,16 @@ support-files =
   file_htmlserializer_1_raw.html
   file_htmlserializer_1_sibling_body.html
   file_htmlserializer_1_sibling_body_only_body.html
   file_htmlserializer_1_wrap.html
   file_htmlserializer_2.html
   file_htmlserializer_2_basic.html
   file_htmlserializer_ipv6.html
   file_htmlserializer_ipv6_out.html
-  file_lock_orientation.html
   file_mozfiledataurl_img.jpg
   file_record_orientation.html
   file_restrictedEventSource.sjs
   file_settimeout_inner.html
   file_timer_flood.html
   file_viewport_scroll_quirks.html
   file_viewport_scroll_xml.xml
   file_x-frame-options_main.html
@@ -176,17 +175,16 @@ support-files =
   file_xhtmlserializer_2_entw3c.xhtml
   file_xhtmlserializer_2_latin1.xhtml
   file_youtube_flash_embed.html
   forRemoval.resource
   forRemoval.resource^headers^
   formReset.html
   invalid_accesscontrol.resource
   invalid_accesscontrol.resource^headers^
-  orientationcommon.js
   plugin.js
   script-1_bug597345.sjs
   script-2_bug597345.js
   script_bug602838.sjs
   send_gzip_content.sjs
   somedatas.resource
   somedatas.resource^headers^
   variable_style_sheet.sjs
@@ -723,24 +721,16 @@ tags = audiochannel
 [test_NodeIterator_mutations_2.html]
 [test_NodeIterator_mutations_3.html]
 [test_nodelist_holes.html]
 [test_noWebAudioNotification.html]
 tags = audiochannel
 [test_open_null_features.html]
 [test_openDialogChromeOnly.html]
 tags = openwindow
-[test_orientation_alternate.html]
-skip-if = true # bug 1312417
-[test_orientation_frame.html]
-skip-if = true # bug 1312417
-[test_orientation_frame_lock.html]
-skip-if = true # bug 1312417
-[test_orientation_sandbox_no_lock.html]
-skip-if = true # bug 1312417
 [test_plugin_freezing.html]
 skip-if = toolkit == 'android' #CLICK_TO_PLAY
 [test_pluginAudioNotification.html]
 tags = audiochannel
 skip-if = toolkit == 'android' # Plugins don't work on Android
 [test_pluginMutedBeforePlay.html]
 tags = audiochannel
 skip-if = toolkit == 'android' # Plugins don't work on Android
@@ -805,16 +795,14 @@ tags = audiochannel
 [test_window_define_nonconfigurable.html]
 [test_window_define_symbol.html]
 [test_window_element_enumeration.html]
 [test_window_enumeration.html]
 [test_window_extensible.html]
 [test_window_indexing.html]
 [test_window_keys.html]
 [test_window_named_frame_enumeration.html]
-[test_window_orientation.html]
-skip-if = true # bug 1312417
 [test_window_own_props.html]
 [test_window_proto.html]
 [test_writable-replaceable.html]
 [test_x-frame-options.html]
 [test_youtube_flash_embed.html]
 # Please keep alphabetical order.
deleted file mode 100644
--- a/dom/base/test/orientationcommon.js
+++ /dev/null
@@ -1,16 +0,0 @@
-function specialPowersLock(orientation) {
-  return SpecialPowers.pushPrefEnv({
-    'set': [ ["dom.screenorientation.testing.non_fullscreen_lock_allow", true] ]
-  }).then(function() => {
-    var p = screen.orientation.lock(orientation);
-  });
-}
-
-function specialPowersUnlock() {
-  return SpecialPowers.pushPrefEnv({
-    'set': [ ["dom.screenorientation.testing.non_fullscreen_lock_allow", true] ]
-  }).then(function() {
-    screen.orientation.unlock();
-    resolve();
-  });
-}
deleted file mode 100644
--- a/dom/base/test/test_orientation_alternate.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Test for ScreenOrientation API</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="orientationcommon.js"></script>
-<div id="log"></div>
-<script>
-async_test(function(t) {
-  var originalOrientation = screen.orientation.type;
-  var alternateOrientation = originalOrientation == "portrait-primary" ?
-    "landscape-primary" : "portrait-primary";
-  var p = specialPowersLock(alternateOrientation);
-  p.then(function() {
-    t.step(function() { assert_equals(screen.orientation.type, alternateOrientation); });
-    return specialPowersLock(originalOrientation);
-  }).then(function() {
-    t.step(function() { assert_equals(screen.orientation.type, originalOrientation); });
-    return specialPowersUnlock();
-  }).then(function() {
-    t.done();
-  }).catch(t.step_func(function(err) {
-    assert_unreached("Error setting orientation: " + err);
-    t.done();
-  }));
-}, "Test locking and unlocking orientation.");
-</script>
deleted file mode 100644
--- a/dom/base/test/test_orientation_frame.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Test for ScreenOrientation API</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="orientationcommon.js"></script>
-<div id="log"></div>
-<iframe id="frame"></iframe>
-<script>
-async_test(function(t) {
-  var originalOrientation = screen.orientation.type;
-  var alternateOrientation = originalOrientation == "portrait-primary" ?
-    "landscape-primary" : "portrait-primary";
-
-  window.addEventListener("message", function(event) {
-    t.step(function() { assert_array_equals(event.data, [alternateOrientation, originalOrientation]); });
-    t.done();
-  });
-
-  var frame = document.getElementById("frame");
-  frame.src = "file_record_orientation.html";
-
-  frame.onload = function() {
-    var p = specialPowersLock(alternateOrientation);
-    p.then(function() {
-      return specialPowersLock(originalOrientation);
-    }).then(function() {
-      return specialPowersUnlock();
-    }).then(function() {
-      frame.contentWindow.postMessage("report", "*");
-    }).catch(t.step_func(function(err) {
-      assert_unreached("Error setting orientation: " + err);
-      t.done();
-    }));
-  };
-}, "Test orientation change event in frame.");
-</script>
deleted file mode 100644
--- a/dom/base/test/test_orientation_frame_lock.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Test for ScreenOrientation API</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="orientationcommon.js"></script>
-<div id="log"></div>
-<iframe sandbox="allow-scripts allow-orientation-lock" id="frame"></iframe>
-<script>
-async_test(function(t) {
-  var originalOrientation = screen.orientation.type;
-  var alternateOrientation = originalOrientation == "portrait-primary" ?
-    "landscape-primary" : "portrait-primary";
-
-  var orientationChanges = [];
-  window.screen.orientation.onchange = function() {
-    orientationChanges.push(screen.orientation.type);
-  };
-
-  window.addEventListener("message", function(event) {
-    t.step(function() {
-      assert_equals(event.data, "success");
-      assert_array_equals(orientationChanges, [ alternateOrientation ]);
-    });
-
-    // Return the orientation to its original settings.
-    var p = specialPowersLock(originalOrientation);
-    p.then(function() {
-      return specialPowersUnlock();
-    }).then(function() {
-      t.done();
-    }).catch(t.step_func(function(err) {
-      assert_unreached("Error setting orientation: " + err);
-      t.done();
-    }));
-  });
-
-  var frame = document.getElementById("frame");
-  frame.src = "http://example.com/tests/dom/base/test/file_lock_orientation.html";
-
-  frame.onload = function() {
-    assert_array_equals(orientationChanges, []);
-    frame.contentWindow.postMessage(alternateOrientation, "*");
-  };
-}, "Test orientation lock from within a frame with sandbox permission.");
-</script>
deleted file mode 100644
--- a/dom/base/test/test_orientation_sandbox_no_lock.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Test for ScreenOrientation API</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="orientationcommon.js"></script>
-<div id="log"></div>
-<iframe sandbox="allow-scripts" id="frame"></iframe>
-<script>
-async_test(function(t) {
-  var originalOrientation = screen.orientation.type;
-  var alternateOrientation = originalOrientation == "portrait-primary" ?
-    "landscape-primary" : "portrait-primary";
-
-  var orientationChanges = [];
-  window.screen.orientation.onchange = function() {
-    orientationChanges.push(screen.orientation.type);
-  };
-
-  window.addEventListener("message", function(event) {
-    t.step(function() {
-      assert_equals(event.data, "error");
-      assert_array_equals(orientationChanges, []);
-      t.done();
-    });
-  });
-
-  var frame = document.getElementById("frame");
-  frame.src = "http://example.com/tests/dom/base/test/file_lock_orientation.html";
-
-  frame.onload = function() {
-    assert_array_equals(orientationChanges, []);
-    frame.contentWindow.postMessage(alternateOrientation, "*");
-  };
-}, "Test orientation lock from within a frame without sandbox permission.");
-</script>
deleted file mode 100644
--- a/dom/base/test/test_window_orientation.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Test for window.orientation</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="orientationcommon.js"></script>
-<div id="log"></div>
-<script>
-async_test(function(t) {
-  var originalOrientation = screen.orientation.type;
-  var alternateOrientation = originalOrientation == "portrait-primary" ?
-    "landscape-primary" : "portrait-primary";
-
-  var originalWindowOrientation = window.orientation;
-  window.onorientationchange = function() {
-    t.step(function() { assert_not_equals(window.orientation, originalWindowOrientation); });
-
-    var p2 = specialPowersUnlock();
-    p2.then(function() {
-      t.done();
-    }).catch(t.step_func(function(err) {
-      assert_unreached("Error unlocking orientation: " + err);
-      t.done();
-    }));
-  }
-
-  var p1 = specialPowersLock(alternateOrientation);
-  p1.catch(t.step_func(function(err) {
-    assert_unreached("Error locking orientation: " + err);
-    t.done();
-  }));
-}, "Test window.orientation and orientationchange.");
-</script>