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

Side by Side Diff: LayoutTests/compositing/gestures/gesture-tapHighlight-1-overflow-div-layout-change.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, 3 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 id="targetDiv" style="-webkit-transform: translateZ(0); position: relative; left: 10px; top: 10px"></div> 7 <div id="targetDiv" style="-webkit-transform: translateZ(0); position: relative; left: 10px; top: 10px"></div>
8 <div style="position: relative; left: 10px; top: 40px; width: 200px; height: 100 px; overflow-y: scroll; overflow-x: scroll;"> 8 <div style="position: relative; left: 10px; top: 40px; width: 200px; height: 100 px; overflow-y: scroll; overflow-x: scroll;">
9 <a href="">Link 1</a><br> 9 <a href="">Link 1</a><br>
10 <a href="">Link 2</a><br> 10 <a href="">Link 2</a><br>
11 <a href="" id="targetLink" style="-webkit-tap-highlight-color: rgba(0, 255, 0, 0 .5)">Target Link.</a><br> 11 <a href="" id="targetLink" style="-webkit-tap-highlight-color: rgba(0, 255, 0, 0 .5)">Target Link.</a><br>
12 <a href="">Link 4</a><br> 12 <a href="">Link 4</a><br>
13 <a href="">Link 5</a><br> 13 <a href="">Link 5</a><br>
14 </div> 14 </div>
15 <div style="position: relative; left: 10px; top: 80px"> 15 <div style="position: relative; left: 10px; top: 80px">
16 This test is successful if "Target Link" above is covered in a transparent green rectangle with rounded corners. 16 This test is successful if "Target Link" above is covered in a transparent green rectangle with rounded corners.
17 </div> 17 </div>
18 <script> 18 <script>
19 function runTest() { 19 function runTest() {
20 var targetLink = document.getElementById('targetLink'); 20 var targetLink = document.getElementById('targetLink');
21 var clientRect = document.getElementById('targetLink').getBoundingClientRect (); 21 var clientRect = document.getElementById('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.dumpAsText(true); 25 testRunner.dumpAsTextWithPixelResults();
26 testRunner.waitUntilDone(); 26 testRunner.waitUntilDone();
27 } 27 }
28 28
29 // In this test a link highlight is commenced, then a new node is inserted b efore the highlight 29 // In this test a link highlight is commenced, then a new node is inserted b efore the highlight
30 // target, forcing a layout change that moves the target node mid-animation. 30 // target, forcing a layout change that moves the target node mid-animation.
31 if (window.eventSender) { 31 if (window.eventSender) {
32 eventSender.gestureTapDown(x, y); 32 eventSender.gestureTapDown(x, y);
33 var newLink = document.createElement('a'); 33 var newLink = document.createElement('a');
34 newLink.setAttribute('href', ''); 34 newLink.setAttribute('href', '');
35 newLink.innerHTML = 'Link 3'; 35 newLink.innerHTML = 'Link 3';
36 targetLink.parentNode.insertBefore(newLink, targetLink); 36 targetLink.parentNode.insertBefore(newLink, targetLink);
37 targetLink.parentNode.insertBefore(document.createElement('br'), targetL ink) 37 targetLink.parentNode.insertBefore(document.createElement('br'), targetL ink)
38 window.setTimeout(function() { window.testRunner.notifyDone(); }, 0); 38 window.setTimeout(function() { window.testRunner.notifyDone(); }, 0);
39 } else { 39 } else {
40 debug("This test requires DumpRenderTree."); 40 debug("This test requires DumpRenderTree.");
41 } 41 }
42 } 42 }
43 </script> 43 </script>
44 </script> 44 </script>
45 </body> 45 </body>
46 </html> 46 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698