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

Side by Side Diff: LayoutTests/fast/dom/shadow/tooltips-in-shadow.html

Issue 14677012: Made Blink tooltip ShadowDOM-aware (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <body onload="test()">
4 <script src="../../js/resources/js-test-pre.js"></script>
5 <script src="resources/shadow-dom.js"></script>
6 <div id="container">
7 </div>
8
9 <script>
10 window.jsTestIsAsync = true;
11
12 function setup()
13 {
14 var D = createDOM;
15 var S = createShadowRoot;
16 var cases = [];
17
18 label1 = 'Case1: Non-Nested';
19 container.appendChild(D('div', {'id': 'host1'}, S(D('a', {'id': 'target1', 't itle': label1}, document.createTextNode("Hello1")))));
20 cases.push({ target: getNodeInShadowTreeStack('host1/target1'), expected: lab el1 });
21
22 label2 = 'Case 2: Nested';
23 container.appendChild(D('div', {'id': 'host2'}, S(D('div', {'id': 'host2b'}, S(D('a', {'id': 'target2', 'title': label2}, document.createTextNode("Hello2"))) ))));
24 cases.push({ target: getNodeInShadowTreeStack('host2/host2b/target2'), expect ed: label2 });
25
26 label3 = 'Case 3: Multiple Shadow';
27 container.appendChild(D('div', {'id': 'host3'}, S(D('div', {'id': 'scope3a'}) ), S(D('a', {'id': 'scope3b', 'title': label3 }, document.createTextNode("Hello3 ")))));
dglazkov 2013/05/13 16:11:42 It would be cool to start using <template> + a cus
Hajime Morrita 2013/05/14 00:13:53 Um... next time :-) It would be more useful when w
28 cases.push({ target: getNodeInShadowTreeStack('host3//scope3b'), expected: la bel3 });
29
30 return cases;
31 }
32
33 function moveTo(target)
34 {
35 if (window.eventSender) {
36 eventSender.dragMode = false;
37 eventSender.mouseMoveTo(target.offsetLeft, target.offsetTop + target.off setHeight / 2);
38 }
39 }
40
41 function test()
42 {
43 var harnesses = setup();
44
45 for (var i = 0; i < harnesses.length; i++) {
46 harness = harnesses[i];
47 moveTo(harness.target);
48 if (window.testRunner)
49 debug("Test for " + harness.expected);
50 shouldBe("harness.expected", "testRunner.tooltipText");
51 }
52
53 container.style.display = "none";
54 finishJSTest();
55
56 }
57 </script>
58 <script src="../../js/resources/js-test-post.js"></script>
59 </body>
60 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/tooltips-in-shadow-expected.txt » ('j') | Source/core/rendering/HitTestResult.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698