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> |