| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 function runTests() { | 49 function runTests() { |
| 50 // Can't do anything useful here without eventSender | 50 // Can't do anything useful here without eventSender |
| 51 if (window.eventSender) { | 51 if (window.eventSender) { |
| 52 var nodesToTest = document.querySelectorAll('#test-container > div'); | 52 var nodesToTest = document.querySelectorAll('#test-container > div'); |
| 53 for (var i = 0; i < nodesToTest.length; i++) { | 53 for (var i = 0; i < nodesToTest.length; i++) { |
| 54 var node = nodesToTest[i]; | 54 var node = nodesToTest[i]; |
| 55 debug('TEST CASE: ' + node.textContent); | 55 debug('TEST CASE: ' + node.textContent); |
| 56 | 56 |
| 57 // Make sure the node is visible and move the mouse over top of it. | 57 // Make sure the node is visible and move the mouse over top of it. |
| 58 document.body.scrollTop = node.offsetTop - 50; | 58 document.documentElement.scrollTop = node.offsetTop - 50; |
| 59 eventSender.mouseMoveTo(node.offsetLeft + 3, node.offsetTop - docume
nt.body.scrollTop + 3); | 59 eventSender.mouseMoveTo(node.offsetLeft + 3, node.offsetTop - docume
nt.documentElement.scrollTop + 3); |
| 60 | 60 |
| 61 // Get details of the current mouse cursor. | 61 // Get details of the current mouse cursor. |
| 62 // Note that we could return structured data which we then validate,
but that's a lot more | 62 // Note that we could return structured data which we then validate,
but that's a lot more |
| 63 // work and is redundant with relying on the expected output anyway.
Better to just dump | 63 // work and is redundant with relying on the expected output anyway.
Better to just dump |
| 64 // it and inspect that it matches the description. | 64 // it and inspect that it matches the description. |
| 65 debug('Cursor Info: ' + window.internals.getCurrentCursorInfo(docume
nt)); | 65 debug('Cursor Info: ' + window.internals.getCurrentCursorInfo(docume
nt)); |
| 66 debug(''); | 66 debug(''); |
| 67 } | 67 } |
| 68 // This text is redundant with the test output - hide it | 68 // This text is redundant with the test output - hide it |
| 69 testContainer.style.display = 'none'; | 69 testContainer.style.display = 'none'; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 85 } | 85 } |
| 86 | 86 |
| 87 // Now wait for each image to load or fail to load before starting tests. | 87 // Now wait for each image to load or fail to load before starting tests. |
| 88 // Without this we can get null images in the cursors - eg. no known size. | 88 // Without this we can get null images in the cursors - eg. no known size. |
| 89 preloadImagesFromStyle(testContainer, 9, runTests, /(#greenbox|_FAIL)/); | 89 preloadImagesFromStyle(testContainer, 9, runTests, /(#greenbox|_FAIL)/); |
| 90 | 90 |
| 91 </script> | 91 </script> |
| 92 <script src="../../fast/js/resources/js-test-post.js"></script> | 92 <script src="../../fast/js/resources/js-test-post.js"></script> |
| 93 </body> | 93 </body> |
| 94 </html> | 94 </html> |
| OLD | NEW |