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

Unified 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: Remove the validity checks for eventSender and testRunner Created 3 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGUseElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..6625e4f8012a596e43531575c6fa87e98fd16feb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/svg/dom/tooltip-title-with-use.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<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="blueSquare">
+ <rect width="50" height="50" fill="blue">
+ <title>Title in Rect</title>
+ </rect>
+ </symbol>
+ <use x="100" y="100" xlink:href="#greenSquare"></use>
+ <use x="200" y="100" xlink:href="#blueSquare"></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) {
+ if (!window.eventSender || !window.testRunner)
+ return;
+ eventSender.dragMode = false;
+ eventSender.mouseMoveTo(x,y);
+ test(function () {
+ assert_equals(testRunner.tooltipText, expectedText);
+ }, description);
+}
+</script>
« 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