Bug 1215812 - Increase the internal timeout for a test that depends on a window opening. r=Ms2ger, a=test-only
authorJames Graham <james@hoppipolla.co.uk>
Tue, 08 Mar 2016 16:24:00 +0000
changeset 325426 abf5a827bb806ebf91edef4e1562df5dcbab261b
parent 325425 31d81c652c3be990c1589a74f50ccf0a6a9ee326
child 325427 07ffad91cb33df1d72fd3d08ef6af24dd1554607
push id1128
push userjlund@mozilla.com
push dateWed, 01 Jun 2016 01:31:59 +0000
treeherdermozilla-release@fe0d30de989d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMs2ger, test-only
bugs1215812
milestone47.0a2
Bug 1215812 - Increase the internal timeout for a test that depends on a window opening. r=Ms2ger, a=test-only 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>