js/xpconnect/crashtests/752038.html
author Emilio Cobos Álvarez <ecoal95@gmail.com>
Fri, 29 Jul 2016 10:50:26 -0700
changeset 347524 0e1f1a9c666d2ba8ddba5246fb4e705244edbeb4
parent 99262 3bfee91d5f0931f996259d6864f9dba6c3a45d97
child 374655 7b434711753b98a87603453caaa0945791ffe12b
permissions -rw-r--r--
Bug 1287951: followup: Know if a snapshot belongs to a HTML element in an HTML document at construction time. r=heycam MozReview-Commit-ID: eN0j8vnesa

<html class="reftest-wait">
<head>
<script>

// document.write() doesn't play well with reftest-wait, so we need to use an
// iframe.
//
// This test is designed to trigger an assertion, but that assertion depends on
// non-deterministic hashtable iteration ordering. The assertion seems to happen
// around 80% of the time, so we just run the operation 10 times.

var i = 0;
function iterate() {
  ++i;
  if (i < 10) {
    document.getElementById("f").src = "752038-iframe.html";
  } else {
    document.documentElement.removeAttribute("class");
  }
}
window.addEventListener('message', iterate, false);

</script>
</head>
<body>
<iframe id="f" src="752038-iframe.html"></iframe>
</body>
</html>