Bug 1457336: followup: Try to fix test_find.html on Android. r=me

Let's see if this manages to reopen the CLOSED TREE. It's either raciness on
load, or it's timing out, so I hope it's this, really.

MozReview-Commit-ID: KUbJvRcTlNF
This commit is contained in:
Emilio Cobos Álvarez 2018-05-29 23:43:22 +02:00
parent fa3809ad7d
commit 4ede9b0c13

View File

@ -2,12 +2,11 @@
<meta charset="utf-8">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<iframe srcdoc="<!doctype html><html></html>"></iframe>
<script>
const t = async_test("Test window.find / nsFind");
const iframe = document.querySelector("iframe")
function testFindable(isFindable, textToFind, docText, description) {
const iframe = document.querySelector("iframe")
iframe.contentDocument.documentElement.innerHTML = docText;
iframe.contentWindow.getSelection().removeAllRanges();
assert_equals(
@ -32,8 +31,7 @@ const BLOCK_LIKE_DISPLAY_VALUES = [
"flex",
];
iframe.onload = t.step_func_done(function() {
window.runTests = t.step_func_done(function() {
testFindable(true, "me and me", `
me <div style="display: contents">and</div> me
`, "display: contents");
@ -77,3 +75,4 @@ iframe.onload = t.step_func_done(function() {
`);
});
</script>
<iframe onload="runTests()" srcdoc="<!doctype html><html></html>"></iframe>