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

Side by Side Diff: LayoutTests/fast/events/touch/touch-handler-count.html

Issue 11647025: Revert 138190 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 8 years 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-handler-count-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <script src="../../js/resources/js-test-pre.js"></script> 1 <script src="../../js/resources/js-test-pre.js"></script>
2 <div id='touchtarget' style='width: 50; height: 50'></div> 2 <div id='touchtarget' style='width: 50; height: 50'></div>
3 <script> 3 <script>
4 description("This test checks that we correctly update the touch event handler c ount as event handlers are added and removed"); 4 description("This test checks that we correctly update the touch event handler c ount as event handlers are added and removed");
5 5
6 debug("Test addEventListener/removeEventListener on the document."); 6 debug("Test addEventListener/removeEventListener on the document.");
7 (function() { 7 (function() {
8 var listener = function() { } 8 var listener = function() { }
9 9
10 shouldBe('window.internals.touchEventHandlerCount(document)', '0'); 10 shouldBe('window.internals.touchEventHandlerCount(document)', '0');
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 shouldBe('window.internals.touchEventHandlerCount(document)', '2'); 197 shouldBe('window.internals.touchEventHandlerCount(document)', '2');
198 198
199 touchtarget.removeChild(div); 199 touchtarget.removeChild(div);
200 shouldBe('window.internals.touchEventHandlerCount(document)', '2'); 200 shouldBe('window.internals.touchEventHandlerCount(document)', '2');
201 201
202 div.ontouchend = null; 202 div.ontouchend = null;
203 div.ontouchmove = null; 203 div.ontouchmove = null;
204 shouldBe('window.internals.touchEventHandlerCount(document)', '0'); 204 shouldBe('window.internals.touchEventHandlerCount(document)', '0');
205 })(); 205 })();
206 206
207 debug("Test that nested Documents' touch handlers are properly removed from thei r parent Document.");
208 (function() {
209 var iframe = document.createElement('iframe');
210 var touchtarget = document.getElementById('touchtarget');
211
212 shouldBe('window.internals.touchEventHandlerCount(document)', '0');
213
214 touchtarget.appendChild(iframe);
215
216 var nestedDocument = iframe.contentWindow.document;
217 nestedDocument.open('text/html', 'replace');
218 nestedDocument.write("<!DOCTYPE html>\n<html><body onload=\"window.ontouchst art = function() { };\"></body>");
219 nestedDocument.close();
220
221 shouldBe('window.internals.touchEventHandlerCount(document)', '1');
222
223 touchtarget.removeChild(iframe);
224 shouldBe('window.internals.touchEventHandlerCount(document)', '0');
225 })();
226 </script> 207 </script>
227 </body> 208 </body>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/touch/touch-handler-count-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698