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

Unified Diff: third_party/WebKit/LayoutTests/svg/custom/use-instanceRoot-event-listener-liveness.xhtml

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: Rewrite Created 4 years, 5 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-instanceRoot-event-listener-liveness.xhtml
diff --git a/third_party/WebKit/LayoutTests/svg/custom/use-instanceRoot-event-listener-liveness.xhtml b/third_party/WebKit/LayoutTests/svg/custom/use-instanceRoot-event-listener-liveness.xhtml
deleted file mode 100644
index 62775aa49228b528c2dd61817f3c44c1a67b065b..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/svg/custom/use-instanceRoot-event-listener-liveness.xhtml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-</head>
-<body onload="startTest()">
-
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100px" height="100px">
pdr. 2016/07/30 04:02:42 Can you re-add a test like this (with a simulated
hayato 2016/08/01 03:44:10 Done. I have re-added a test like this, but ensure
- <defs>
- <rect id="target" fill="green" width="100" height="100"/>
- </defs>
- <use id="test" xlink:href="#target"/>
-</svg>
-
-<div id="console">Test failed</div>
-
-<script>
-if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
-}
-
-function eventHandler()
-{
- var divElement = document.getElementById("console");
- divElement.textContent = "Test passed";
-
- if (window.testRunner)
- testRunner.notifyDone();
-}
-
-function fireSimulatedMouseClickEvent(eventTarget)
-{
- var event = document.createEvent("MouseEvents");
- event.initMouseEvent("click", true, true, document.defaultView, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
- eventTarget.dispatchEvent(event);
-}
-
-function startTest() {
- var useElement = document.getElementById("test");
-
- var shadowRoot = internals.shadowRoot(useElement);
-
- // No-op, as no listener is not yet registered
- fireSimulatedMouseClickEvent(shadowRoot.firstChild);
-
- // Add listener
- shadowRoot.firstChild.addEventListener("click", eventHandler, false);
-
- // Should fire immediately and finish the test
- fireSimulatedMouseClickEvent(shadowRoot.firstChild);
-}
-</script>
-
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698