diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /parser/htmlparser/tests/mochitest/test_bug655682.html | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'parser/htmlparser/tests/mochitest/test_bug655682.html')
-rw-r--r-- | parser/htmlparser/tests/mochitest/test_bug655682.html | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/parser/htmlparser/tests/mochitest/test_bug655682.html b/parser/htmlparser/tests/mochitest/test_bug655682.html new file mode 100644 index 000000000..e90967a61 --- /dev/null +++ b/parser/htmlparser/tests/mochitest/test_bug655682.html @@ -0,0 +1,80 @@ +<!DOCTYPE HTML> +<html> +<!-- +https://bugzilla.mozilla.org/show_bug.cgi?id=655682 +--> +<head> + <title>Test for Bug 655682</title> + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> +</head> +<body> +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=655682">Mozilla Bug 655682</a> +<p id="display"></p> +<div id="content" style="display: none"> + <iframe src=file_bug655682.sjs></iframe> +</div> +<pre id="test"> +<script type="application/javascript"> + +/** Test for Bug 655682 **/ + +var gotOnload = false; +var finishedTesting = false; + +function tryFinishTest() { + if (gotOnload && finishedTesting) { + SimpleTest.finish(); + } +} + +addLoadEvent(function() { + // Hit the event loop again just to make sure that we're not ending the test + // before all activity we care about is done. + SimpleTest.executeSoon(function() { + gotOnload = true; + tryFinishTest(); + }); +}); + +var tdsSeen = 0; + +var triggeredSecondTd = false; + +var iframe = document.getElementsByTagName("iframe")[0]; + +SimpleTest.waitForExplicitFinish(); + +function probe() { + var tds = iframe.contentDocument.getElementsByTagName("td").length; + switch (tds) { + case 0: + setTimeout(probe, 0); + return; + case 1: + tdsSeen = tds; + if (!triggeredSecondTd) { + triggeredSecondTd = true; + var script = document.createElement("script"); + script.src = "file_bug655682.sjs?trigger=1"; + document.head.appendChild(script); + } + setTimeout(probe, 0); + return; + case 2: + is(tdsSeen, 1, "Should have seen one td before seeing two."); + finishedTesting = true; + tryFinishTest(); + return; + default: + ok(false, "Wrong number of tds"); + SimpleTest.finish(); + } +} + +setTimeout(probe, 0); + +</script> +</pre> +</body> +</html> |