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

Side by Side Diff: LayoutTests/compositing/gestures/gesture-tapHighlight-1-overflow-div-scrolled-late-composite.html

Issue 24438004: Rename testRunner.dumpAsText(true) to testRunner.dumpAsTextWithPixelResults() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: more tests Created 7 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../fast/js/resources/js-test-pre.js"></script> 4 <script src="../../fast/js/resources/js-test-pre.js"></script>
5 </head> 5 </head>
6 <body onload="runTest();"> 6 <body onload="runTest();">
7 <div style="-webkit-transform: translateZ(0); position: relative; left: 10px; to p: 10px"></div> 7 <div style="-webkit-transform: translateZ(0); position: relative; left: 10px; to p: 10px"></div>
8 <div id="targetDiv" style="position: relative; left: 10px; top: 40px; width: 200 px; height: 100px; overflow-y: scroll; overflow-x: scroll;"> 8 <div id="targetDiv" style="position: relative; left: 10px; top: 40px; width: 200 px; height: 100px; overflow-y: scroll; overflow-x: scroll;">
9 <div id="divToForceCompositedLayer"> 9 <div id="divToForceCompositedLayer">
10 <a href="">Link 1</a><br> 10 <a href="">Link 1</a><br>
11 <a href="">Link 2</a><br> 11 <a href="">Link 2</a><br>
12 <a href="">Link 3</a><br> 12 <a href="">Link 3</a><br>
13 <a href="" id="targetLink" style="-webkit-tap-highlight-color: rgba(0, 255, 0, 0 .5)">Target Link.</a><br> 13 <a href="" id="targetLink" style="-webkit-tap-highlight-color: rgba(0, 255, 0, 0 .5)">Target Link.</a><br>
14 <a href="">Link 4</a><br> 14 <a href="">Link 4</a><br>
15 <a href="">Link 5</a><br> 15 <a href="">Link 5</a><br>
16 </div></div> 16 </div></div>
17 <div style="position: relative; left: 10px; top: 80px"> 17 <div style="position: relative; left: 10px; top: 80px">
18 This test is successful if "Target Link" above is covered in a transparent green rectangle with rounded corners. 18 This test is successful if "Target Link" above is covered in a transparent green rectangle with rounded corners.
19 </div> 19 </div>
20 <script> 20 <script>
21 function runTest() { 21 function runTest() {
22 var targetDiv = document.getElementById('targetDiv'); 22 var targetDiv = document.getElementById('targetDiv');
23 var clientRect = document.getElementById('targetLink').getBoundingClientRect (); 23 var clientRect = document.getElementById('targetLink').getBoundingClientRect ();
24 x = (clientRect.left + clientRect.right) / 2; 24 x = (clientRect.left + clientRect.right) / 2;
25 y = (clientRect.top + clientRect.bottom) / 2; 25 y = (clientRect.top + clientRect.bottom) / 2;
26 if (window.testRunner) { 26 if (window.testRunner) {
27 testRunner.dumpAsText(true); 27 testRunner.dumpAsTextWithPixelResults();
28 testRunner.waitUntilDone(); 28 testRunner.waitUntilDone();
29 } 29 }
30 30
31 // This test highlights a link in a non-composited overflow-div, then forces that div to become composited, 31 // This test highlights a link in a non-composited overflow-div, then forces that div to become composited,
32 // then scrolls that div, then exits. If everything is working correctly, th e link highlight will still 32 // then scrolls that div, then exits. If everything is working correctly, th e link highlight will still
33 // be displayed correctly after all these operations. 33 // be displayed correctly after all these operations.
34 if (window.eventSender && window.testRunner) { 34 if (window.eventSender && window.testRunner) {
35 35
36 eventSender.gestureTapDown(x, y); 36 eventSender.gestureTapDown(x, y);
37 window.testRunner.display(); 37 window.testRunner.display();
38 38
39 document.getElementById('divToForceCompositedLayer').style.webkitTransfo rm = 'translateZ(0)'; 39 document.getElementById('divToForceCompositedLayer').style.webkitTransfo rm = 'translateZ(0)';
40 document.body.offsetTop; 40 document.body.offsetTop;
41 window.testRunner.display(); 41 window.testRunner.display();
42 42
43 targetDiv.scrollTop += 20; 43 targetDiv.scrollTop += 20;
44 window.setTimeout(function() { window.testRunner.notifyDone(); }, 0); 44 window.setTimeout(function() { window.testRunner.notifyDone(); }, 0);
45 } else { 45 } else {
46 debug("This test requires DumpRenderTree."); 46 debug("This test requires DumpRenderTree.");
47 } 47 }
48 } 48 }
49 </script> 49 </script>
50 </script> 50 </script>
51 </body> 51 </body>
52 </html> 52 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698