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

Unified Diff: LayoutTests/fast/events/panScroll-nested-divs.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-nested-divs.html
diff --git a/LayoutTests/fast/events/panScroll-nested-divs.html b/LayoutTests/fast/events/panScroll-nested-divs.html
index e0bb11c0520930a9f508507380d070d934b1928d..8b84001fe69fe54c4672d21108516bfe605f1880 100644
--- a/LayoutTests/fast/events/panScroll-nested-divs.html
+++ b/LayoutTests/fast/events/panScroll-nested-divs.html
@@ -1,49 +1,47 @@
<html>
- <head>
- <title>Pan Scrolling Test</title>
- </head>
- <body>
- <script>
- if (testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- }
- </script>
- <div id="overflow" style="width:500px; height:300px; overflow:auto; border:2px solid red; padding:10px">
- <div style="height:200px; position:relative;">
- <div style="height:150px; border:1px blue solid; overflow:auto;">
- Panscrolling starting in the blue box should scroll the outer div.
- </div>
- Panscrolling outside the blue boxes should scroll the outer div.
- </div>
- <div style="height:200px; position:relative;">
- <div style="height:150px; border:1px blue solid; overflow:auto;">
- Panscrolling starting in the blue box should scroll the outer div.
- </div>
- </div>
+<head>
+<style type="text/css">
+#scrollable {
+ width:500px;
+ height:300px;
+ overflow:auto;
+ border:2px solid red;
+ padding:10px";
+}
+</style>
+<script src="../js/resources/js-test-pre.js"></script>
+<script src="./resources/panScroll.js"></script>
+<script>
+function start()
+{
+ description('Check pan scroll in nested divs');
+ testPanScroll({
+ 'clickOrDrag': 'click',
+ '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=28023">bug 28023</a> This tests that pan scrolling
+propogates correctly up the DOM tree. On success, our scroll offset should be non-zero.
+<div id="scrollable">
+ <div style="height:200px; position:relative;">
+ <div style="height:150px; border:1px blue solid; overflow:auto;">
+ Panscrolling starting in the blue box should scroll the outer div.
</div>
- <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=28023">bug 28023</a> This tests that pan scrolling
- propogates correctly up the DOM tree. On success, our scroll offset should be non-zero.</p>
- <div id="console"></div>
- <script>
- if (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>
+ Panscrolling outside the blue boxes should scroll the outer div.
+ </div>
+ <div style="height:200px; position:relative;">
+ <div style="height:150px; border:1px blue solid; overflow:auto;">
+ Panscrolling starting in the blue box should scroll the outer div.
+ </div>
+ </div>
+</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-in-iframe-expected.txt ('k') | LayoutTests/fast/events/panScroll-nested-divs-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698