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

Side by Side Diff: LayoutTests/fast/events/mouse-cursor-multiframecur.html

Issue 26472003: Fix improper scrollTop/Left usage in LayoutTests/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@issue_304768
Patch Set: Fix improper scrollTop/Left usage in LayoutTests/ Created 7 years, 2 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../js/resources/js-test-pre.js"></script> 4 <script src="../js/resources/js-test-pre.js"></script>
5 <script src="../js/resources/image-preload-helper.js"></script> 5 <script src="../js/resources/image-preload-helper.js"></script>
6 <style type="text/css"> 6 <style type="text/css">
7 </style> 7 </style>
8 </head> 8 </head>
9 <body> 9 <body>
10 <p id="description"></p> 10 <p id="description"></p>
(...skipping 10 matching lines...) Expand all
21 21
22 function runTests() { 22 function runTests() {
23 // Can't do anything useful here without eventSender 23 // Can't do anything useful here without eventSender
24 if (window.eventSender) { 24 if (window.eventSender) {
25 var nodesToTest = document.querySelectorAll('#test-container > div'); 25 var nodesToTest = document.querySelectorAll('#test-container > div');
26 for (var i = 0; i < nodesToTest.length; i++) { 26 for (var i = 0; i < nodesToTest.length; i++) {
27 var node = nodesToTest[i]; 27 var node = nodesToTest[i];
28 debug('TEST CASE: ' + node.textContent); 28 debug('TEST CASE: ' + node.textContent);
29 29
30 // Make sure the node is visible and move the mouse over top of it. 30 // Make sure the node is visible and move the mouse over top of it.
31 document.body.scrollTop = node.offsetTop - 50; 31 document.documentElement.scrollTop = node.offsetTop - 50;
32 eventSender.mouseMoveTo(node.offsetLeft + 3, node.offsetTop - docume nt.body.scrollTop + 3); 32 eventSender.mouseMoveTo(node.offsetLeft + 3, node.offsetTop - docume nt.documentElement.scrollTop + 3);
33 33
34 // Get details of the current mouse cursor. 34 // Get details of the current mouse cursor.
35 // Note that we could return structured data which we then validate, but that's a lot more 35 // Note that we could return structured data which we then validate, but that's a lot more
36 // work and is redundant with relying on the expected output anyway. Better to just dump 36 // work and is redundant with relying on the expected output anyway. Better to just dump
37 // it and inspect that it matches the description. 37 // it and inspect that it matches the description.
38 debug('Cursor Info: ' + window.internals.getCurrentCursorInfo(docume nt)); 38 debug('Cursor Info: ' + window.internals.getCurrentCursorInfo(docume nt));
39 debug(''); 39 debug('');
40 } 40 }
41 // This text is redundant with the test output - hide it 41 // This text is redundant with the test output - hide it
42 testContainer.style.display = 'none'; 42 testContainer.style.display = 'none';
(...skipping 15 matching lines...) Expand all
58 } 58 }
59 59
60 // Now wait for each image to load or fail to load before starting tests. 60 // Now wait for each image to load or fail to load before starting tests.
61 // Without this we can get null images in the cursors - eg. no known size. 61 // Without this we can get null images in the cursors - eg. no known size.
62 preloadImagesFromStyle(testContainer, 1, runTests); 62 preloadImagesFromStyle(testContainer, 1, runTests);
63 63
64 </script> 64 </script>
65 <script src="../../fast/js/resources/js-test-post.js"></script> 65 <script src="../../fast/js/resources/js-test-post.js"></script>
66 </body> 66 </body>
67 </html> 67 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698