Bug 1215812 - Increase the internal timeout for a test that depends on a window opening, r=Ms2ger draft
authorJames Graham <james@hoppipolla.co.uk>
Tue, 08 Mar 2016 16:24:00 +0000
changeset 339483 742a6187408d8029cd9626e83e58e650e4bafd73
parent 337389 6cacb08f6f5ca0f3345288c5ed4d707352a22fe9
child 516003 5cc12f14af887f4a2924251f7e9016e6a99e6d32
push id12746
push userbmo:james@hoppipolla.co.uk
push dateFri, 11 Mar 2016 14:00:55 +0000
reviewersMs2ger
bugs1215812
milestone47.0a1
Bug 1215812 - Increase the internal timeout for a test that depends on a window opening, r=Ms2ger MozReview-Commit-ID: HzNYyHiehbU
testing/web-platform/meta/html/browsers/windows/browsing-context-names/002.html.ini
testing/web-platform/tests/html/browsers/windows/browsing-context-names/002.html
deleted file mode 100644
--- a/testing/web-platform/meta/html/browsers/windows/browsing-context-names/002.html.ini
+++ /dev/null
@@ -1,9 +0,0 @@
-[002.html]
-  type: testharness
-  disabled:
-    if debug or (os == "win"): https://bugzilla.mozilla.org/show_bug.cgi?id=1215461
-  [Link with target=_blank, no rel]
-    expected:
-      if debug and e10s and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
-      if debug and e10s and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
-
--- a/testing/web-platform/tests/html/browsers/windows/browsing-context-names/002.html
+++ b/testing/web-platform/tests/html/browsers/windows/browsing-context-names/002.html
@@ -1,26 +1,25 @@
 <!doctype html>
 <title>Link with target=_blank, no rel</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id="log"></div>
 <a href="002-1.html" target="_blank">Link</a>
 <script>
-var t = async_test();
 var a;
-t.step(function() {
+async_test(function(t) {
   a = document.getElementsByTagName("a")[0];
   a.click();
-  //This is a bit hacky; if the test fails there isn't a link back to the parent
-  //window so we have to pass on a timeout. But opening the link could be slow in
-  //some cases, so there is some possibility of false fails
-  setTimeout(t.step_func(function() {
-               assert_unreached("Failed to get callback from opened window");
-             }), 1000);
+
+  // This is a bit hacky; if the test fails there isn't a link back to the parent
+  // window so we have to pass on a timeout. But opening the link could be slow in
+  // some cases, so there is some possibility of false fails
+  step_timeout(t.step_func(function() {
+                 assert_unreached("Failed to get callback from opened window");
+               }), 5000);
+
+  onmessage = t.step_func(function(e) {
+    assert_equals(e.data, "PASS");
+    t.done()
+  });
 });
-
-onmessage = t.step_func(function(e) {
-  assert_equals(e.data, "PASS");
-  t.done()
-}
-);
 </script>