Bug 1215812 - Increase the internal timeout for a test that depends on a window opening, r=Ms2ger

MozReview-Commit-ID: HzNYyHiehbU

--HG--
extra : rebase_source : c255aac4b598a21d136c88c76bed9888fbc2158b
This commit is contained in:
James Graham 2016-03-08 16:24:00 +00:00
Родитель dac18564eb
Коммит 9267d1e64f
2 изменённых файлов: 13 добавлений и 23 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -5,22 +5,21 @@
<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);
});
onmessage = t.step_func(function(e) {
assert_equals(e.data, "PASS");
t.done()
}
);
// 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()
});
});
</script>