zalan@apple.com | 9f69ab1 | 2015-08-18 06:03:51 +0000 | [diff] [blame] | 1 | <html> |
| 2 | <script>jsTestIsAsync = true;</script> |
| 3 | <script src="../../resources/js-test-pre.js"></script> |
| 4 | <head> |
| 5 | <title>This tests that outline repaint rect for focus ring is correct.</title> |
| 6 | <style> |
| 7 | div { |
| 8 | position: absolute; |
| 9 | top: 10px; |
zalan@apple.com | 5a3ac89 | 2015-08-19 22:09:27 +0000 | [diff] [blame] | 10 | height: 10px; |
zalan@apple.com | 9f69ab1 | 2015-08-18 06:03:51 +0000 | [diff] [blame] | 11 | width: 10px; |
| 12 | outline: auto 3px; |
| 13 | } |
| 14 | </style> |
| 15 | </head> |
| 16 | <body> |
| 17 | <div id=foo></div> |
| 18 | </body> |
| 19 | <script> |
| 20 | setTimeout( |
| 21 | function() { |
| 22 | if (window.internals) |
| 23 | internals.startTrackingRepaints(); |
| 24 | document.getElementById("foo").style.top = "50px"; |
| 25 | document.body.offsetWidth; |
| 26 | |
| 27 | if (window.internals) { |
| 28 | shouldNotBe("window.internals.repaintRectsAsText().indexOf('5 7')", "-1"); |
| 29 | shouldNotBe("window.internals.repaintRectsAsText().indexOf('5 47')", "-1"); |
| 30 | internals.stopTrackingRepaints(); |
| 31 | } |
| 32 | finishJSTest(); |
| 33 | }, 0); |
| 34 | </script> |
| 35 | <script src="../../resources/js-test-post.js"></script> |
| 36 | </html> |