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

Unified Diff: LayoutTests/fast/events/panScroll-event-fired.html

Issue 15653007: Introduce panScrollTest() for simplify pan-scroll test scripts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-06-03T12:33 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/events/panScroll-event-fired.html
diff --git a/LayoutTests/fast/events/panScroll-event-fired.html b/LayoutTests/fast/events/panScroll-event-fired.html
index 7d74ce6585c7ee05906a2604c16f027870870684..49f485da5f31b9e37b55fd2c2f83b67bf560c991 100644
--- a/LayoutTests/fast/events/panScroll-event-fired.html
+++ b/LayoutTests/fast/events/panScroll-event-fired.html
@@ -1,46 +1,38 @@
<html>
- <head>
- <title>Pan Scrolling Test</title>
- </head>
- <body>
- <script>
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- }
-
- addEventListener('mousedown',
- function(event) {
- console.log("Mousedown with " + event.button);
- }
- , false);
- </script>
- <div id="overflow" style="width:500px; height:150px; overflow:auto; border:2px solid red; padding:10px">
- <h1>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=32303">bug 32303</a> This tests that pan
- scrolling works without event.preventDefault and the middle button mousedown event is fired.
- To test manually, try to pan scroll inside this div.</h1>
- </div>
- <p>
- <div id="console"></div>
- <script>
- if (window.eventSender)
- {
- eventSender.mouseMoveTo(50, 50);
- eventSender.mouseDown(1);
- eventSender.mouseUp(1);
- eventSender.mouseMoveTo(50, 200);
- setTimeout(finished, 500);
- }
-
- function finished()
- {
- if (document.getElementById('overflow').scrollTop)
- document.getElementById('console').innerHTML = "Success! Div with overflow was scrolled";
- else
- document.getElementById('console').innerHTML = "Fail! Div with overflow was not scrolled";
-
- window.testRunner.notifyDone();
- }
- </script>
- </body>
+<head>
+<style type="text/css">
+#scrollable {
+ height: 200px;
+ overflow: auto;
+ border: solid 3px #cc0000;
+ font-size: 80px;
+}
+</style>
+<script src="../js/resources/js-test-pre.js"></script>
+<script src="./resources/panScroll.js"></script>
+<script>
+window.addEventListener('mousedown', function(event) {
+});
+
+function start()
+{
+ description('Check pan scroll with mousedown event handler');
+ testPanScroll({
+ 'clickOrDrag': 'drag',
+ 'scrollable': $('scrollable'),
+ });
+}
+</script>
+</head>
+<body onload="start()">
+<div id="container">
+<p id="description"></p>
+Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=32303">bug 32303</a> This tests that pan
+scrolling works without event.preventDefault and the middle button mousedown event is fired.
+To test manually, try to pan scroll inside this div.
+<div id="scrollable"></div>
+</div>
+<div id="console"></div>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
</html>
« no previous file with comments | « LayoutTests/fast/events/panScroll-drag-expected.txt ('k') | LayoutTests/fast/events/panScroll-event-fired-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698