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

Side by Side Diff: LayoutTests/fast/events/touch/gesture/resources/gesture-tap-active-state-iframe-inner.html

Issue 197923006: Refactor touch hit-testing hover/active tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments Created 6 years, 9 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 <link rel="stylesheet" href="../../resources/touch-hover-active-tests.css">
3 <style type="text/css"> 4 <style type="text/css">
4 #box { 5 #box {
5 position: absolute; 6 position: absolute;
6 background-color: blue;
7 width: 300px; 7 width: 300px;
8 height: 100px; 8 height: 100px;
9 top: 100px; 9 top: 100px;
10 } 10 }
11
12 #box:active {
13 background-color: red;
14 }
15
16 </style> 11 </style>
17 <script> 12 <body>
18 var color; 13 <div id='box' class='touch-interactive'>Gestures go here</div>
19 function isBoxActive()
20 {
21 // These need to match the background-color used above, after round-tripping .
22 var defaultColor = "rgb(0, 0, 255)";
23 var activeColor = "rgb(255, 0, 0)";
24
25 var b = document.getElementById('box');
26 color = getComputedStyle(b).backgroundColor;
27 if (color == activeColor)
28 return true;
29 if (color != defaultColor)
30 throw "Got unexpected backgroundColor: " + color;
31 return false;
32 }
33
34 </script>
35 <body onload='parent.runTests(isBoxActive)'>
36 <div id='box'>Gestures go here</div>
37 </body> 14 </body>
38 </html> 15 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698