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

Side by Side Diff: LayoutTests/compositing/gestures/gesture-tapHighlight-shadow-tree.html

Issue 637763002: Unprefix usage of -webkit-transform in tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <script src="resources/link-highlight-helper.js"></script> 3 <script src="resources/link-highlight-helper.js"></script>
4 <body onload="runTest();"> 4 <body onload="runTest();">
5 5
6 <template id="shadow-tree"> 6 <template id="shadow-tree">
7 <a href="" id="targetLink" style="-webkit-tap-highlight-color: rgb(0, 255, 0)">< content></content></a> 7 <a href="" id="targetLink" style="-webkit-tap-highlight-color: rgb(0, 255, 0)">< content></content></a>
8 </template> 8 </template>
9 9
10 <div id="host" style="-webkit-transform: translateZ(0); padding: 20px;"> 10 <div id="host" style="transform: translateZ(0); padding: 20px;">
11 <img width="320" height="240" src="resources/dice.png"> 11 <img width="320" height="240" src="resources/dice.png">
12 </div> 12 </div>
13 13
14 <script> 14 <script>
15 useMockHighlight(); 15 useMockHighlight();
16 var shadowRoot = document.querySelector('#host').createShadowRoot(); 16 var shadowRoot = document.querySelector('#host').createShadowRoot();
17 shadowRoot.appendChild(document.importNode(document.querySelector('#shadow-tree' ).content, true)); 17 shadowRoot.appendChild(document.importNode(document.querySelector('#shadow-tree' ).content, true));
18 var targetLink = shadowRoot.querySelector('#targetLink'); 18 var targetLink = shadowRoot.querySelector('#targetLink');
19 19
20 function runTest() { 20 function runTest() {
21 var clientRect = targetLink.getBoundingClientRect(); 21 var clientRect = targetLink.getBoundingClientRect();
22 x = (clientRect.left + clientRect.right) / 2; 22 x = (clientRect.left + clientRect.right) / 2;
23 y = (clientRect.top + clientRect.bottom) / 2; 23 y = (clientRect.top + clientRect.bottom) / 2;
24 if (window.testRunner) { 24 if (window.testRunner) {
25 testRunner.dumpAsTextWithPixelResults(); 25 testRunner.dumpAsTextWithPixelResults();
26 testRunner.waitUntilDone(); 26 testRunner.waitUntilDone();
27 } 27 }
28 28
29 if (window.eventSender) { 29 if (window.eventSender) {
30 eventSender.gestureShowPress(x, y); 30 eventSender.gestureShowPress(x, y);
31 window.setTimeout(function() { window.testRunner.notifyDone(); }, 0); 31 window.setTimeout(function() { window.testRunner.notifyDone(); }, 0);
32 } else { 32 } else {
33 debug("This test requires DumpRenderTree."); 33 debug("This test requires DumpRenderTree.");
34 debug("This test is successful if the image below is covered in a green box with square ranges."); 34 debug("This test is successful if the image below is covered in a green box with square ranges.");
35 } 35 }
36 } 36 }
37 </script> 37 </script>
38 </body> 38 </body>
39 </html> 39 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698