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

Unified Diff: third_party/WebKit/LayoutTests/svg/custom/use-event-attribute.html

Issue 2186823002: Do not call an event listener on a cloned node in svg <use>'s UA shadow tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: skip timeout test Created 4 years, 4 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
Index: third_party/WebKit/LayoutTests/svg/custom/use-event-attribute.html
diff --git a/third_party/WebKit/LayoutTests/svg/custom/use-event-attribute.html b/third_party/WebKit/LayoutTests/svg/custom/use-event-attribute.html
new file mode 100644
index 0000000000000000000000000000000000000000..bec73189add015d23149f8fd90d4327391a09152
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/svg/custom/use-event-attribute.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+window.targets = [];
+async_test((t) => {
+ window.addEventListener('load', t.step_func(() => {
+ assert_array_equals(window.targets, [document.querySelector('image')]);
+ t.done();
+ }));
+}, 'An event listener should not be called on a cloned node in a svg <use>\'s UA shadow tree.');
+</script>
+<svg>
+ <g id="a">
+ <image href="" onerror="window.targets.push(event.target);">
+ </g>
+ <use href="#a">
+</svg>

Powered by Google App Engine
This is Rietveld 408576698