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

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

Issue 14859016: Don't force layout for mouse event hit tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix review comment 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
55 debug("Verify active isn't initially set"); 58 debug("Verify active isn't initially set");
56 shouldBeFalse("isBoxActive()"); 59 shouldBeFalse("isBoxActive()");
57 60
58 debug("Verify tapdown,tap sets and clears active"); 61 debug("Verify tapdown,tap sets and clears active");
59 eventSender.gestureTapDown(50, 50); 62 eventSender.gestureTapDown(50, 50);
60 shouldBeTrue("isBoxActive()"); 63 shouldBeTrue("isBoxActive()");
61 eventSender.gestureTap(50, 50); 64 eventSender.gestureTap(50, 50);
62 shouldBeFalse("isBoxActive()"); 65 shouldBeFalse("isBoxActive()");
63 66
64 debug("Verify tapdown,tapcancel on the element sets and clears active"); 67 debug("Verify tapdown,tapcancel on the element sets and clears active");
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 shouldBeTrue("isBoxActive()"); 100 shouldBeTrue("isBoxActive()");
98 eventSender.gestureTap(50, 50); 101 eventSender.gestureTap(50, 50);
99 shouldBeFalse("isBoxActive()"); 102 shouldBeFalse("isBoxActive()");
100 } 103 }
101 104
102 runTests(); 105 runTests();
103 </script> 106 </script>
104 <script src="../../../js/resources/js-test-post.js"></script> 107 <script src="../../../js/resources/js-test-post.js"></script>
105 </body> 108 </body>
106 </html> 109 </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