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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/replaceChild-domsubtreemodified.html

Issue 2325143002: Node.replaceChild with an empty DocumentFragment should not dispatch DOMSubtreeModified twice. (Closed)
Patch Set: Created 4 years, 3 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 | third_party/WebKit/LayoutTests/fast/loader/delete-inside-cancelTimer.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/dom/replaceChild-domsubtreemodified.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/replaceChild-domsubtreemodified.html b/third_party/WebKit/LayoutTests/fast/dom/replaceChild-domsubtreemodified.html
new file mode 100644
index 0000000000000000000000000000000000000000..b9c6f99551c47ef4d4d13f2470355173bfcb70a1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dom/replaceChild-domsubtreemodified.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<div id="target"><span id="last"></span></div>
+<script>
+test(() => {
+ var events = [];
+ function recordEvent(event) {
+ events.push(event.type);
+ }
+ var target = document.getElementById('target');
+ var last = document.getElementById('last')
+ target.addEventListener('DOMSubtreeModified', recordEvent, false);
+ target.replaceChild(document.createDocumentFragment(), last);
+ assert_array_equals(events, ['DOMSubtreeModified']);
+}, 'replaceChild with an empty DocumentFragment should not dispatch two DOMSubtreeModified events.')
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/loader/delete-inside-cancelTimer.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698