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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/dom/MutationObserver/document-write-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <head>
3 </head>
4 <body>
5 <div id="result">RESULT</div>
6 <script>
7
8 var resultDiv = document.getElementById('result');
9
10 if (window.testRunner) {
11 testRunner.dumpAsText();
12 testRunner.waitUntilDone();
13 }
14
15 var count = 0;
16
17 var observer = new MutationObserver(function(r) {
18 count += r.length;
19 });
20
21 var div = document.createElement('div');
22 observer.observe(div, { attributes: true });
23
24 function mutate() {
25 div.setAttribute('count', count);
26 }
27
28 var counts = [];
29 function check() {
30 counts.push(count);
31 }
32
33 function finish() {
34 setTimeout(function() {
35 check();
36
37 var result = counts[0] == 0 &&
38 counts[1] == 0 &&
39 counts[2] == 0 &&
40 counts[3] == 1 ? 'PASSED' : 'FAILED';
41
42 document.documentElement.appendChild(document.createElement('body'));
43 document.body.innerHTML = result;
44 if (window.testRunner) {
45 testRunner.notifyDone();
46 }
47 }, 0);
48 }
49
50 finish();
51 </script>
52 <iframe onload="mutate(); check(); document.write('<script>check();</script>'); check(); finish();">
53 </body>
OLDNEW
« 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