| Index: LayoutTests/fast/dom/MutationObserver/document-write.html
|
| diff --git a/LayoutTests/fast/dom/MutationObserver/document-write.html b/LayoutTests/fast/dom/MutationObserver/document-write.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b3741dbdd98138bf6829be468700efbb31ae8eed
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/dom/MutationObserver/document-write.html
|
| @@ -0,0 +1,53 @@
|
| +<!DOCTYPE html>
|
| +<head>
|
| +</head>
|
| +<body>
|
| +<div id="result">RESULT</div>
|
| +<script>
|
| +
|
| +var resultDiv = document.getElementById('result');
|
| +
|
| +if (window.testRunner) {
|
| + testRunner.dumpAsText();
|
| + testRunner.waitUntilDone();
|
| +}
|
| +
|
| +var count = 0;
|
| +
|
| +var observer = new MutationObserver(function(r) {
|
| + count += r.length;
|
| +});
|
| +
|
| +var div = document.createElement('div');
|
| +observer.observe(div, { attributes: true });
|
| +
|
| +function mutate() {
|
| + div.setAttribute('count', count);
|
| +}
|
| +
|
| +var counts = [];
|
| +function check() {
|
| + counts.push(count);
|
| +}
|
| +
|
| +function finish() {
|
| + setTimeout(function() {
|
| + check();
|
| +
|
| + var result = counts[0] == 0 &&
|
| + counts[1] == 0 &&
|
| + counts[2] == 0 &&
|
| + counts[3] == 1 ? 'PASSED' : 'FAILED';
|
| +
|
| + document.documentElement.appendChild(document.createElement('body'));
|
| + document.body.innerHTML = result;
|
| + if (window.testRunner) {
|
| + testRunner.notifyDone();
|
| + }
|
| + }, 0);
|
| +}
|
| +
|
| +finish();
|
| +</script>
|
| +<iframe onload="mutate(); check(); document.write('<script>check();</script>'); check(); finish();">
|
| +</body>
|
|
|