Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Unified Diff: LayoutTests/fast/dom/MutationObserver/document-write.html

Issue 184043002: Only Microtask::performCheckpoint() if recursionLevel is 0 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: cleanup Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/dom/MutationObserver/document-write-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/MutationObserver/document-write-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698