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

Unified Diff: third_party/WebKit/LayoutTests/svg/custom/resources/use-instanceRoot-event-bubbling.js

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/resources/use-instanceRoot-event-bubbling.js
diff --git a/third_party/WebKit/LayoutTests/svg/custom/resources/use-instanceRoot-event-bubbling.js b/third_party/WebKit/LayoutTests/svg/custom/resources/use-instanceRoot-event-bubbling.js
index d46db72373fd04308da9c78e1ca2f87db6f9884e..96eaed68bec294d160ebef8f092225d2f80df8da 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/resources/use-instanceRoot-event-bubbling.js
+++ b/third_party/WebKit/LayoutTests/svg/custom/resources/use-instanceRoot-event-bubbling.js
@@ -4,7 +4,7 @@ description("Tests whether SVG event bubbling works across shadow trees.");
var svgNS = "http://www.w3.org/2000/svg";
var xhtmlNS = "http://www.w3.org/1999/xhtml";
var expected = new Array(4);
-var tests = 4;
+var tests = 2;
var counter = 0;
var eventCounter = 0;
@@ -55,23 +55,13 @@ function nextTest()
switch (counter) {
case 1:
- rect.onclick = function(evt) { eventHandler(evt, 1); };
- expected[0] = "[EventHandler 1] type: click phase: AT_TARGET target: [object SVGRectElement] (id: rect) currentTarget: [object SVGRectElement] (id: rect)";
+ use.setAttribute("onclick", "eventHandler(evt, 1)");
+ expected[0] = "[EventHandler 1] type: click phase: AT_TARGET target: [object SVGUseElement] (id: use) currentTarget: [object SVGUseElement] (id: use)";
testListeners();
break;
case 2:
- rectContainer.addEventListener("click", function(evt) { eventHandler(evt, 2) }, false);
- expected[1] = "[EventHandler 2] type: click phase: BUBBLING target: [object SVGRectElement] (id: rect) currentTarget: [object SVGGElement] (id: rectParent)";
- testListeners();
- break;
- case 3:
- use.setAttribute("onclick", "eventHandler(evt, 3)");
- expected[2] = "[EventHandler 3] type: click phase: AT_TARGET target: [object SVGUseElement] (id: use) currentTarget: [object SVGUseElement] (id: use)";
- testListeners();
- break;
- case 4:
- useContainer.onclick = function(evt) { eventHandler(evt, 4) };
- expected[3] = "[EventHandler 4] type: click phase: BUBBLING target: [object SVGUseElement] (id: use) currentTarget: [object SVGGElement] (id: useParent)";
+ useContainer.onclick = function(evt) { eventHandler(evt, 2) };
+ expected[1] = "[EventHandler 2] type: click phase: BUBBLING target: [object SVGUseElement] (id: use) currentTarget: [object SVGGElement] (id: useParent)";
testListeners();
break;
}
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | third_party/WebKit/LayoutTests/svg/custom/use-event-attribute.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698