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"); |
} |