Bug 1388028 - Update tests within widget/tests to comply with new data: URI inheritance model. r=smaug
authorChristoph Kerschbaumer <ckerschb@christophkerschbaumer.com>
Mon, 07 Aug 2017 20:13:12 +0200
changeset 422804 ed23f9af00002eaef7303a646a9c1067976f2340
parent 422803 57d1339ad1c0096ce889ce3088c54aa08ffa1412
child 422805 89cfa36b6fdac80427003414befe9264d6d98013
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1388028
milestone57.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 1388028 - Update tests within widget/tests to comply with new data: URI inheritance model. r=smaug
widget/tests/chrome.ini
widget/tests/file_bug596600.html
widget/tests/file_secure_input.html
widget/tests/test_bug596600.xul
widget/tests/test_secure_input.html
--- a/widget/tests/chrome.ini
+++ b/widget/tests/chrome.ini
@@ -70,21 +70,23 @@ skip-if = true # Bug 1207190
 skip-if = toolkit != "cocoa"
 support-files = standalone_native_menu_window.xul
 [test_bug586713.xul]
 skip-if = toolkit != "cocoa"
 support-files = bug586713_window.xul
 [test_key_event_counts.xul]
 skip-if = toolkit != "cocoa"
 [test_bug596600.xul]
+support-files = file_bug596600.html
 skip-if = toolkit != "cocoa"
 [test_bug673301.xul]
 subsuite = clipboard
 skip-if = toolkit != "cocoa"
 [test_secure_input.html]
+support-files = file_secure_input.html
 skip-if = toolkit != "cocoa"
 [test_native_key_bindings_mac.html]
 skip-if = toolkit != "cocoa"
 [test_system_status_bar.xul]
 skip-if = toolkit != "cocoa"
 
 # Windows
 # taskbar_previews.xul
new file mode 100644
--- /dev/null
+++ b/widget/tests/file_bug596600.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<body>
+Content page
+</body>
new file mode 100644
--- /dev/null
+++ b/widget/tests/file_secure_input.html
@@ -0,0 +1,1 @@
+<input id="text" type"text"><input id="password" type"password">
--- a/widget/tests/test_bug596600.xul
+++ b/widget/tests/test_bug596600.xul
@@ -40,25 +40,26 @@ function openWindows() {
     SimpleTest.waitForFocus(attachIFrameToRightWindow, gRightWindow);
   }, gLeftWindow);
 }
 
 function attachIFrameToRightWindow() {
   gIFrame = gLeftWindow.document.createElementNS(XUL_NS, "iframe");
   gIFrame.setAttribute("type", "content");
   gIFrame.setAttribute("clickthrough", "never");
-  gIFrame.setAttribute("src", "data:text/html,<!DOCTYPE html>Content page");
+  gIFrame.setAttribute("src", "file_bug596600.html");
   gIFrame.style.width = "100px";
   gIFrame.style.height = "100px";
   gIFrame.style.margin = "50px";
   gLeftWindow.document.documentElement.appendChild(gIFrame);
-  gIFrame.contentWindow.addEventListener("load", function (e) {
-    gIFrame.removeEventListener("load", arguments.callee, false);
+  gIFrame.addEventListener("load", function (e) {
+    gIFrame.removeEventListener("load", arguments.callee, true);
     test1();
-  }, false);
+  }, true);
+
 }
 
 function test1() {
   // gRightWindow is active, gLeftWindow is inactive.
   moveMouseTo(0, 0, function () {
     var expectMouseOver = false, expectMouseOut = false;
     function mouseOverListener(e) {
       ok(expectMouseOver, "Got expected mouseover at " + e.screenX + ", " + e.screenY);
--- a/widget/tests/test_secure_input.html
+++ b/widget/tests/test_secure_input.html
@@ -76,17 +76,17 @@
     $("input_change").type = "password";
     sendAKeyEvent();
     ok(true, "Not crashed: input on <input type=\"password\"> changed from type=\"text\"");
     $("input_change").type = "text";
     sendAKeyEvent();
     ok(true, "Not crashed: input on <input type=\"text\"> changed from type=\"password\"");
 
     otherWindow =
-      window.open("data:text/html,<input id=\"text\" type\"text\"><input id=\"password\" type\"password\">",
+      window.open("file_secure_input.html",
                   "_blank", "chrome,width=100,height=100");
     ok(otherWindow, "failed to open other window");
     if (!otherWindow) {
       SimpleTest.finish();
       return;
     }
 
     $("input_text").focus();