Bug 1215812 - Increase the internal timeout for a test that depends on a window opening, r=Ms2ger
authorJames Graham <james@hoppipolla.co.uk>
Tue, 08 Mar 2016 16:24:00 +0000
changeset 288563 9814ff02695354505c46acc4fa86745336136966
parent 288562 1b7481e9a32de585e6d563c7290088319e090fc6
child 288564 23bb5776bd4fffe41919d79f814a261254b5dbf1
push id18167
push userkwierso@gmail.com
push dateTue, 15 Mar 2016 00:40:50 +0000
treeherderfx-team@992db1cffc5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMs2ger
bugs1215812
milestone48.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>