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

Unified Diff: LayoutTests/svg/custom/resources/use-instanceRoot-event-listeners.js

Issue 257033002: Do not implement EventTarget on SVGElementInstance (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Try to fix TestExpectations Created 6 years, 7 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: LayoutTests/svg/custom/resources/use-instanceRoot-event-listeners.js
diff --git a/LayoutTests/svg/custom/resources/use-instanceRoot-event-listeners.js b/LayoutTests/svg/custom/resources/use-instanceRoot-event-listeners.js
index d699ad1b23ef2d22079f416d7488046cc52276b8..5b5c4663e0ac68ff54f919fa6256497438a3a43f 100644
--- a/LayoutTests/svg/custom/resources/use-instanceRoot-event-listeners.js
+++ b/LayoutTests/svg/custom/resources/use-instanceRoot-event-listeners.js
@@ -23,7 +23,7 @@ function finishTest()
{
successfullyParsed = true;
- useElement.instanceRoot.correspondingElement.setAttribute("fill", "green");
+ rectElement.setAttribute("fill", "green");
shouldBeTrue("successfullyParsed");
debug('<br /><span class="pass">TEST COMPLETE</span>');
@@ -66,22 +66,22 @@ function fireDelayedEvent()
function testOne()
{
// Install event listener on correspondingElement via setAttribute
- useElement.instanceRoot.correspondingElement.setAttribute("onmouseover", "eventHandler(evt)");
+ shadowRoot.firstChild.setAttribute("onmouseover", "eventHandler(evt)");
recordMouseEvent("mouseover");
}
function testTwo()
{
// Install event listener on correspondingElement via onmouseout JS magic
- useElement.instanceRoot.correspondingElement.onmouseout = eventHandler;
+ shadowRoot.firstChild.onmouseout = eventHandler;
recordMouseEvent("mouseout");
}
function testThree()
{
// Clean event listeners on different ways
- useElement.instanceRoot.correspondingElement.removeAttribute("onmouseover");
- useElement.instanceRoot.correspondingElement.onmouseout = 0;
+ shadowRoot.firstChild.removeAttribute("onmouseover");
+ shadowRoot.firstChild.onmouseout = 0;
// Verify they really got removed
sendMouseEvent("mouseover");
@@ -93,7 +93,7 @@ function testThree()
function testFour()
{
- useElement.instanceRoot.correspondingElement.removeAttribute("onmousedown");
+ shadowRoot.firstChild.removeAttribute("onmousedown");
// Install event listener on the referenced element, without using the SVGElementInstance interface
rectElement.setAttribute("onmouseup", "eventHandler(evt)");
@@ -108,25 +108,25 @@ function testFive()
function testSix()
{
- useElement.instanceRoot.correspondingElement.onmouseout = null;
+ shadowRoot.firstChild.onmouseout = null;
sendMouseEvent("mouseout");
- useElement.instanceRoot.correspondingElement.removeAttribute('onmouseup');
+ shadowRoot.firstChild.removeAttribute('onmouseup');
sendMouseEvent("mouseup");
- useElement.instanceRoot.correspondingElement.onmouseup = eventHandler;
+ shadowRoot.firstChild.onmouseup = eventHandler;
recordMouseEvent("mouseup");
}
function testSeven()
{
- useElement.instanceRoot.addEventListener("mouseout", eventHandler, false);
+ shadowRoot.firstChild.addEventListener("mouseout", eventHandler, false);
recordMouseEvent("mouseout");
}
function testEight()
{
- useElement.instanceRoot.correspondingElement.addEventListener("mouseover", eventHandler, false);
+ shadowRoot.firstChild.addEventListener("mouseover", eventHandler, false);
recordMouseEvent("mouseover");
}

Powered by Google App Engine
This is Rietveld 408576698