| OLD | NEW |
| 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 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 function checkCursors() { | 31 function checkCursors() { |
| 32 debug('Checking cursors with device pixel ratio of ' + window.devicePixelRat
io); | 32 debug('Checking cursors with device pixel ratio of ' + window.devicePixelRat
io); |
| 33 debug('----------------------------------------------'); | 33 debug('----------------------------------------------'); |
| 34 | 34 |
| 35 var nodesToTest = document.querySelectorAll('#test-container > div'); | 35 var nodesToTest = document.querySelectorAll('#test-container > div'); |
| 36 for (var i = 0; i < nodesToTest.length; i++) { | 36 for (var i = 0; i < nodesToTest.length; i++) { |
| 37 var node = nodesToTest[i]; | 37 var node = nodesToTest[i]; |
| 38 debug('TEST CASE: ' + node.textContent); | 38 debug('TEST CASE: ' + node.textContent); |
| 39 // Make sure the node is visible and move the mouse over top of it. | 39 // Make sure the node is visible and move the mouse over top of it. |
| 40 document.body.scrollTop = node.offsetTop - 50; | 40 document.documentElement.scrollTop = node.offsetTop - 50; |
| 41 eventSender.mouseMoveTo(node.offsetLeft + 3, node.offsetTop - document.b
ody.scrollTop + 3); | 41 eventSender.mouseMoveTo(node.offsetLeft + 3, node.offsetTop - document.d
ocumentElement.scrollTop + 3); |
| 42 | 42 |
| 43 // Get details of the current mouse cursor. | 43 // Get details of the current mouse cursor. |
| 44 // Note that we could return structured data which we then validate, but
that's a lot more | 44 // Note that we could return structured data which we then validate, but
that's a lot more |
| 45 // work and is redundant with relying on the expected output anyway. Be
tter to just dump | 45 // work and is redundant with relying on the expected output anyway. Be
tter to just dump |
| 46 // it and inspect that it matches the description. | 46 // it and inspect that it matches the description. |
| 47 debug('Cursor Info: ' + window.internals.getCurrentCursorInfo(document))
; | 47 debug('Cursor Info: ' + window.internals.getCurrentCursorInfo(document))
; |
| 48 debug(''); | 48 debug(''); |
| 49 } | 49 } |
| 50 } | 50 } |
| 51 | 51 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 79 } | 79 } |
| 80 | 80 |
| 81 // Now wait for each image to load or fail to load before starting tests. | 81 // Now wait for each image to load or fail to load before starting tests. |
| 82 // Without this we can get null images in the cursors - eg. no known size. | 82 // Without this we can get null images in the cursors - eg. no known size. |
| 83 preloadImagesFromStyle(testContainer, 6, runTests, /doesntexist/); | 83 preloadImagesFromStyle(testContainer, 6, runTests, /doesntexist/); |
| 84 | 84 |
| 85 </script> | 85 </script> |
| 86 <script src="../../fast/js/resources/js-test-post.js"></script> | 86 <script src="../../fast/js/resources/js-test-post.js"></script> |
| 87 </body> | 87 </body> |
| 88 </html> | 88 </html> |
| OLD | NEW |