Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/svg/dom/tooltip-title-with-use.html |
| diff --git a/third_party/WebKit/LayoutTests/svg/dom/tooltip-title-with-use.html b/third_party/WebKit/LayoutTests/svg/dom/tooltip-title-with-use.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..502feed232d0ba64642c6dd58d11971e1789bc22 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/svg/dom/tooltip-title-with-use.html |
| @@ -0,0 +1,37 @@ |
| +<!DOCTYPE html> |
| +<body> |
|
fs
2017/03/02 08:45:07
You don't need this.
mrunal
2017/03/02 23:49:06
Done.
|
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<div id=log></div> |
|
fs
2017/03/02 08:45:07
Or this.
mrunal
2017/03/02 23:49:07
Done.
|
| +<svg width="400" height="400"> |
| + <symbol id="greenSquare"> |
| + <title>Title in Symbol</title> |
| + <rect width="50" height="50" fill="green"> |
| + <title>Title in Rect</title> |
| + </rect> |
| + </symbol> |
| + <symbol id="redSquare"> |
|
fs
2017/03/02 08:45:07
Nit: Could you make this "blueSquare" or so instea
mrunal
2017/03/02 23:49:06
Done.
|
| + <rect width="50" height="50" fill="red"> |
| + <title>Title in Rect</title> |
| + </rect> |
| + </symbol> |
| + <use x="100" y="100" xlink:href="#greenSquare"></use> |
| + <use x="200" y="100" xlink:href="#redSquare"></use> |
| + <use x="300" y="100" xlink:href="#greenSquare"> |
| + <title>Title in Use</title> |
| + </use> |
| +</svg> |
| +<script> |
| +testTooltipText(125, 125, "Title in Symbol", "Tooltip title of title child under shadow root"); |
| +testTooltipText(225, 125, "", "Tooltip title without any first level title child under shadow root. Should return empty string"); |
| +testTooltipText(325, 125, "Title in Use", "Tooltip title under Use"); |
| + |
| +function testTooltipText(x, y, expectedText, description) { |
| + eventSender.dragMode = false; |
|
fs
2017/03/02 08:45:07
But these two lines in the test function (this sho
mrunal
2017/03/02 23:49:07
Not sure what you meant here but I have now added
fs
2017/03/03 08:53:29
What I meant was to write this as:
test(function(
|
| + eventSender.mouseMoveTo(x,y); |
| + test(function () { |
| + assert_equals(testRunner.tooltipText, expectedText); |
| + }, description); |
| +} |
| +</script> |
| +</body> |
|
fs
2017/03/02 08:45:07
Since <body> isn't needed, neither is this.
mrunal
2017/03/02 23:49:07
Done.
|