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

Side by Side Diff: LayoutTests/svg/custom/use-listener-append-crash.html

Issue 278033003: Avoid using instanceRoot in layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/svg/custom/use-modify-target-container.svg » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <svg width=80 height=40> 3 <svg width=80 height=40>
4 <defs> 4 <defs>
5 <rect id="square" x=4 y=4 width=32 height=32 fill=orange></rect> 5 <rect id="square" x=4 y=4 width=32 height=32 fill=orange></rect>
6 </defs> 6 </defs>
7 7
8 <use id="leftSquare" xlink:href="#square"></use> 8 <use id="leftSquare" xlink:href="#square"></use>
9 <use xlink:href="#square" x=40></use> 9 <use xlink:href="#square" x=40></use>
10 </svg> 10 </svg>
11 11
12 <script> 12 <script>
13 if (window.testRunner) 13 if (window.testRunner)
14 testRunner.dumpAsText(); 14 testRunner.dumpAsText();
15 15
16 leftSquare.addEventListener('mousedown', function() { leftSquare.parentNode. appendChild(leftSquare); }); 16 leftSquare.addEventListener('mousedown', function() { leftSquare.parentNode. appendChild(leftSquare); });
17 leftSquare.addEventListener('mousedown', function() { leftSquare.instanceRoo t.correspondingElement.setAttribute("fill", "green"); }); 17 leftSquare.addEventListener('mousedown', function() { document.getElementByI d("square").setAttribute("fill", "green"); });
18 18
19 if (window.eventSender) { 19 if (window.eventSender) {
20 eventSender.mouseMoveTo(20, 20); 20 eventSender.mouseMoveTo(20, 20);
21 eventSender.mouseDown(); 21 eventSender.mouseDown();
22 eventSender.mouseUp(); 22 eventSender.mouseUp();
23 } 23 }
24 </script> 24 </script>
25 <p>Test re-appending a use node with multiple event listeners, triggered by the first listener. 25 <p>Test re-appending a use node with multiple event listeners, triggered by the first listener.
26 If running manually, click on the left square. 26 If running manually, click on the left square.
27 Pass if no crash and the visible result is an orange square left of a green sq uare.</p> 27 Pass if no crash and the visible result is an orange square left of a green sq uare.</p>
28 </html> 28 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/svg/custom/use-modify-target-container.svg » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698