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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/dom/tooltip-title-with-use.html

Issue 2706583002: Fix the way <title> is read under <use> shadow tree (Closed)
Patch Set: Add checks for eventSender and testRunner Created 3 years, 9 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 | third_party/WebKit/Source/core/svg/SVGUseElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <svg width="400" height="400">
5 <symbol id="greenSquare">
6 <title>Title in Symbol</title>
7 <rect width="50" height="50" fill="green">
8 <title>Title in Rect</title>
9 </rect>
10 </symbol>
11 <symbol id="blueSquare">
12 <rect width="50" height="50" fill="red">
fs 2017/03/03 08:53:30 Nit: red -> blue
mrunal 2017/03/03 20:09:40 Aahh...Done. Thanks.
13 <title>Title in Rect</title>
14 </rect>
15 </symbol>
16 <use x="100" y="100" xlink:href="#greenSquare"></use>
17 <use x="200" y="100" xlink:href="#blueSquare"></use>
18 <use x="300" y="100" xlink:href="#greenSquare">
19 <title>Title in Use</title>
20 </use>
21 </svg>
22 <script>
23 if (!window.eventSender || !window.testRunner)
24 test(function () { assert_unreached(); }, "Cannot run tests without eventSen der and testRunner");
fs 2017/03/03 08:53:30 If you move the eventSender manipulation inside th
mrunal 2017/03/03 20:09:40 Ok, removed.
25
26 testTooltipText(125, 125, "Title in Symbol", "Tooltip title of title child under shadow root");
27 testTooltipText(225, 125, "", "Tooltip title without any first level title child under shadow root. Should return empty string");
28 testTooltipText(325, 125, "Title in Use", "Tooltip title under Use");
29
30 function testTooltipText(x, y, expectedText, description) {
31 if (!window.eventSender || !window.testRunner)
32 return;
33 eventSender.dragMode = false;
34 eventSender.mouseMoveTo(x,y);
35 test(function () {
36 assert_equals(testRunner.tooltipText, expectedText);
37 }, description);
38 }
39 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGUseElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698