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

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

Issue 15508003: Revert "Don't force layout for mouse event hit tests" (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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <script src="../../../js/resources/js-test-pre.js"></script> 3 <script src="../../../js/resources/js-test-pre.js"></script>
4 <style type="text/css"> 4 <style type="text/css">
5 #box { 5 #box {
6 background-color: blue; 6 background-color: blue;
7 width: 300px; 7 width: 300px;
8 height: 100px; 8 height: 100px;
9 } 9 }
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 if (!window.eventSender) { 45 if (!window.eventSender) {
46 debug('This test requires DRT.'); 46 debug('This test requires DRT.');
47 return; 47 return;
48 } 48 }
49 49
50 if (!eventSender.gestureTapDown) { 50 if (!eventSender.gestureTapDown) {
51 debug('GestureTapDown is not supported by this platform'); 51 debug('GestureTapDown is not supported by this platform');
52 return; 52 return;
53 } 53 }
54 54
55 // Mouse events only work after an initial layout
56 document.body.offsetLeft;
57
58 debug("Verify active isn't initially set"); 55 debug("Verify active isn't initially set");
59 shouldBeFalse("isBoxActive()"); 56 shouldBeFalse("isBoxActive()");
60 57
61 debug("Verify tapdown,tap sets and clears active"); 58 debug("Verify tapdown,tap sets and clears active");
62 eventSender.gestureTapDown(50, 50); 59 eventSender.gestureTapDown(50, 50);
63 shouldBeTrue("isBoxActive()"); 60 shouldBeTrue("isBoxActive()");
64 eventSender.gestureTap(50, 50); 61 eventSender.gestureTap(50, 50);
65 shouldBeFalse("isBoxActive()"); 62 shouldBeFalse("isBoxActive()");
66 63
67 debug("Verify tapdown,tapcancel on the element sets and clears active"); 64 debug("Verify tapdown,tapcancel on the element sets and clears active");
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 shouldBeTrue("isBoxActive()"); 97 shouldBeTrue("isBoxActive()");
101 eventSender.gestureTap(50, 50); 98 eventSender.gestureTap(50, 50);
102 shouldBeFalse("isBoxActive()"); 99 shouldBeFalse("isBoxActive()");
103 } 100 }
104 101
105 runTests(); 102 runTests();
106 </script> 103 </script>
107 <script src="../../../js/resources/js-test-post.js"></script> 104 <script src="../../../js/resources/js-test-post.js"></script>
108 </body> 105 </body>
109 </html> 106 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/touch/gesture/gesture-dblclick.html ('k') | LayoutTests/fast/events/updateLayoutForHitTest.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698