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

Unified Diff: LayoutTests/fast/dom/MutationObserver/script-append.html

Issue 146043008: Verify that appendChild(script) does not perform a microtask checkpoint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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/script-append-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/MutationObserver/script-append.html
diff --git a/LayoutTests/fast/dom/MutationObserver/script-end-tag.html b/LayoutTests/fast/dom/MutationObserver/script-append.html
similarity index 53%
copy from LayoutTests/fast/dom/MutationObserver/script-end-tag.html
copy to LayoutTests/fast/dom/MutationObserver/script-append.html
index 76870ad45c9575ebc1fdb8c1a4030c70790bc69b..2bf9feba445dc2bb80bd9354d94a5faab8f57d3b 100644
--- a/LayoutTests/fast/dom/MutationObserver/script-end-tag.html
+++ b/LayoutTests/fast/dom/MutationObserver/script-append.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<script src="../../../resources/js-test.js"></script>
<script>
-description('Test that a script end tags invokes MutationObserver callbacks');
+description('Test that an appended script does NOT invoke MutationObserver callbacks');
var mutationsDelivered = false;
function callback(mutations) {
@@ -13,6 +13,11 @@ var div = document.createElement('div');
observer.observe(div, {attributes: true});
div.setAttribute('foo', 'bar');
shouldBeFalse('mutationsDelivered');
-document.write('<script><\/script>'); // performs a microtask checkpoint
-shouldBeTrue('mutationsDelivered');
+var scriptDidRun = false;
+var script = document.createElement('script');
+script.textContent = 'scriptDidRun = true';
+shouldBeFalse('scriptDidRun');
+document.head.appendChild(script);
+shouldBeTrue('scriptDidRun');
+shouldBeFalse('mutationsDelivered');
</script>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/MutationObserver/script-append-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698