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

Side by Side Diff: LayoutTests/fast/events/touch/script-tests/basic-single-touch-events.js

Issue 990193002: Tweaks layoutTests to use eventSender.setTouchPointRadius correctly (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: LayoutTests fixed (expected results) Created 5 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
« no previous file with comments | « no previous file | LayoutTests/fast/events/touch/touch-browser-zoom-scales-radius.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var div = document.createElement("div"); 1 var div = document.createElement("div");
2 div.id = "touchtarget"; 2 div.id = "touchtarget";
3 div.style.width = "100px"; 3 div.style.width = "100px";
4 div.style.height = "100px"; 4 div.style.height = "100px";
5 div.style.backgroundColor = "blue"; 5 div.style.backgroundColor = "blue";
6 6
7 var lastEvent = null; 7 var lastEvent = null;
8 var touchEventsReceived = 0; 8 var touchEventsReceived = 0;
9 var EXPECTED_TOUCH_EVENTS_TOTAL = 5; 9 var EXPECTED_TOUCH_EVENTS_TOTAL = 5;
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 verifyTouchEvent("touchmove", 1, 1, 1); 85 verifyTouchEvent("touchmove", 1, 1, 1);
86 shouldBeEqualToString("lastEvent.touches[0].target.tagName", "DIV"); 86 shouldBeEqualToString("lastEvent.touches[0].target.tagName", "DIV");
87 break; 87 break;
88 88
89 default: testFailed("Wrong number of touch events! (" + which + ")"); 89 default: testFailed("Wrong number of touch events! (" + which + ")");
90 } 90 }
91 } 91 }
92 92
93 function singleTouchSequence() 93 function singleTouchSequence()
94 { 94 {
95 eventSender.addTouchPoint(10, 10);
95 if (eventSender.setTouchPointRadius) 96 if (eventSender.setTouchPointRadius)
96 eventSender.setTouchPointRadius(10,10); 97 eventSender.setTouchPointRadius(0, 10, 10, false);
97 eventSender.addTouchPoint(10, 10);
98 eventSender.touchStart(); 98 eventSender.touchStart();
99 99
100 if (eventSender.setTouchPointRadius) 100 if (eventSender.setTouchPointRadius)
101 eventSender.setTouchPointRadius(12,12); 101 eventSender.setTouchPointRadius(0, 12, 12, true);
102 eventSender.updateTouchPoint(0, 50, 50); 102 eventSender.updateTouchPoint(0, 50, 50);
103 eventSender.setTouchModifier("shift", true); 103 eventSender.setTouchModifier("shift", true);
104 eventSender.setTouchModifier("alt", true); 104 eventSender.setTouchModifier("alt", true);
105 eventSender.touchMove(); 105 eventSender.touchMove();
106 106
107 eventSender.setTouchModifier("shift", false); 107 eventSender.setTouchModifier("shift", false);
108 eventSender.setTouchModifier("alt", false); 108 eventSender.setTouchModifier("alt", false);
109 109
110 eventSender.releaseTouchPoint(0); 110 eventSender.releaseTouchPoint(0);
111 eventSender.touchEnd(); 111 eventSender.touchEnd();
(...skipping 20 matching lines...) Expand all
132 132
133 lastEvent = null; 133 lastEvent = null;
134 eventSender.clearTouchPoints(); 134 eventSender.clearTouchPoints();
135 touchTargets(); 135 touchTargets();
136 136
137 } else { 137 } else {
138 debug("This test requires DumpRenderTree. Tap on the blue rect to log.") 138 debug("This test requires DumpRenderTree. Tap on the blue rect to log.")
139 } 139 }
140 140
141 141
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/touch/touch-browser-zoom-scales-radius.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698