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

Side by Side Diff: LayoutTests/platform/chromium-win/fast/events/panScroll-in-iframe.html

Issue 15103004: Move Win-specific LayoutTests to generic location (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add calandar-picker tests to NeverFixTests for Mac 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script>
4 var MIDDLE_BUTTON = 1;
5
6 function $(id) { return document.getElementById(id); }
7
8 function doTest() {
9 var scrollable = document.body;
10 for (var i = 0; i < 20; ++i) {
11 var line = document.createElement('div');
12 line.innerHTML = "line " + i;
13 scrollable.appendChild(line);
14 }
15
16 if (!window.eventSender)
17 return;
18
19 var iframe = window.parent.document.getElementById('iframe');
20 var offsetLeft = iframe.offsetLeft;
21 var offsetTop = iframe.offsetTop;
22
23 eventSender.mouseMoveTo(offsetLeft + 5, offsetTop + 5);
24 eventSender.mouseDown(MIDDLE_BUTTON);
25 eventSender.mouseUp(MIDDLE_BUTTON);
26 eventSender.mouseMoveTo(offsetLeft + 5, offsetTop + 50);
27
28 var retryCount = 0;
29 function checkScrolled() {
30 if (scrollable.scrollTop > 0) {
31 window.parent.testDone('SUCCEEDED');
32 return;
33 }
34 ++retryCount;
35 if (retryCount > 10) {
36 window.parent.testDone('FAILED');
37 return;
38 }
39 window.setTimeout(checkScrolled, 50);
40 }
41 checkScrolled();
42 }
43
44 function prepare() {
45 var iframe = document.createElement('iframe');
46 iframe.id = 'iframe';
47 iframe.width = 640;
48 iframe.height = 100;
49 iframe.src = location.href + '?test';
50 document.body.appendChild(iframe);
51
52 if (!window.testRunner)
53 return;
54
55 testRunner.dumpAsText(false);
56 testRunner.waitUntilDone();
57 }
58
59 function start() {
60 if (location.href.indexOf('?') < 0)
61 prepare();
62 else
63 doTest();
64 }
65
66 function testDone(message) {
67 $('result').textContent = message;
68 testRunner.notifyDone();
69 }
70 </script>
71 </head>
72 <body onload="start()">
73 <div id="result">You should run this test in DRT.</div>
74 </body>
75 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698