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

Unified Diff: LayoutTests/fast/events/wheelevent-handler-count.html

Issue 233653006: Unify event handler tracking tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/events/wheelevent-handler-count.html
diff --git a/LayoutTests/fast/events/wheelevent-handler-count.html b/LayoutTests/fast/events/wheelevent-handler-count.html
deleted file mode 100644
index df812fe9e6cf44951fcf2a7865835ab0602a1f80..0000000000000000000000000000000000000000
--- a/LayoutTests/fast/events/wheelevent-handler-count.html
+++ /dev/null
@@ -1,69 +0,0 @@
-<script src="../../resources/js-test.js"></script>
-<script>
-description("This test checks that we correctly update the wheel event handler count as event handlers are added and removed");
-
-(function() {
- // Test addEventListener/removeEventListener on the document.
- var listener = function() { }
-
- shouldBe('window.internals.wheelEventHandlerCount(document)', '0');
- document.addEventListener('mousewheel', listener, true);
- shouldBe('window.internals.wheelEventHandlerCount(document)', '1');
- document.addEventListener('mousewheel', listener, false);
- shouldBe('window.internals.wheelEventHandlerCount(document)', '2');
- document.removeEventListener('mousewheel', listener, true);
- shouldBe('window.internals.wheelEventHandlerCount(document)', '1');
-
- // Try removing the capturing listener again.
- document.removeEventListener('mousewheel', listener, true);
- shouldBe('window.internals.wheelEventHandlerCount(document)', '1');
-
- document.removeEventListener('mousewheel', listener, false);
- shouldBe('window.internals.wheelEventHandlerCount(document)', '0');
-})();
-
-(function() {
- // Test setting onmousewheel on the document.
-
- shouldBe('window.internals.wheelEventHandlerCount(document)', '0');
- document.onmousewheel = function() { }
- shouldBe('window.internals.wheelEventHandlerCount(document)', '1');
- document.onmousewheel = function() { }
- shouldBe('window.internals.wheelEventHandlerCount(document)', '1');
- document.onmousewheel = null;
- shouldBe('window.internals.wheelEventHandlerCount(document)', '0');
-})();
-
-(function() {
- // Test addEventListener/removeEventListener on the window.
- var listener = function() { }
-
- shouldBe('window.internals.wheelEventHandlerCount(document)', '0');
- window.addEventListener('mousewheel', listener, true);
- shouldBe('window.internals.wheelEventHandlerCount(document)', '1');
- window.addEventListener('mousewheel', listener, false);
- shouldBe('window.internals.wheelEventHandlerCount(document)', '2');
- window.removeEventListener('mousewheel', listener, true);
- shouldBe('window.internals.wheelEventHandlerCount(document)', '1');
-
- // Try removing the capturing listener again.
- window.removeEventListener('mousewheel', listener, true);
- shouldBe('window.internals.wheelEventHandlerCount(document)', '1');
-
- window.removeEventListener('mousewheel', listener, false);
- shouldBe('window.internals.wheelEventHandlerCount(document)', '0');
-})();
-
-(function() {
- // Test setting onmousewheel on the window.
- shouldBe('window.internals.wheelEventHandlerCount(document)', '0');
- window.onmousewheel = function() { }
- shouldBe('window.internals.wheelEventHandlerCount(document)', '1');
- window.onmousewheel = function() { }
- shouldBe('window.internals.wheelEventHandlerCount(document)', '1');
- window.onmousewheel = null;
- shouldBe('window.internals.wheelEventHandlerCount(document)', '0');
-})();
-
-</script>
-</body>

Powered by Google App Engine
This is Rietveld 408576698