Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <meta name="viewport" content="width=device-width, initial-scale=1"> | |
|
pdr.
2015/08/08 05:44:14
Lets remove the meta viewport and instead put <!DO
dtapuska
2015/08/10 19:35:42
Done.
| |
| 2 <style> | |
| 3 #myframe { | |
| 4 height: 35px; | |
| 5 width: 100px; | |
| 6 } | |
| 7 </style> | |
| 8 | |
| 9 <script src="../../resources/js-test.js"></script> | |
| 10 <script> | |
| 11 | |
| 12 setPrintTestResultsLazily(); | |
| 13 window.jsTestIsAsync = true; | |
| 14 | |
| 15 description("Ensure hit test cache works in when an iframe is in between loading and loaded."); | |
|
pdr.
2015/08/08 05:44:14
Maybe rephrase this as "Ensure the hit test cache
dtapuska
2015/08/10 19:35:42
Done.
| |
| 16 | |
| 17 function loaded() { | |
| 18 document.body.insertAdjacentHTML('beforeend', '<iframe id="myframe" srcdoc="<p >Hi</p>" onload="iFrameLoaded()"></iframe>'); | |
|
pdr.
2015/08/08 05:44:13
Lets remove <p>Hi</p> so it does't affect hit test
dtapuska
2015/08/10 19:35:42
Done.
| |
| 19 doHit(); | |
| 20 } | |
| 21 | |
| 22 function iFrameLoaded() { | |
| 23 doHit(); | |
| 24 finishJSTest(); | |
| 25 } | |
| 26 | |
| 27 function doHit() { | |
| 28 var rect = document.getElementById('myframe').getBoundingClientRect(); | |
| 29 window.internals.elementFromPoint(document, rect.left + 8, rect.top + 8, false , false); | |
| 30 shouldBe("window.internals.hitTestCacheHits(document)", "0"); | |
| 31 } | |
| 32 </script> | |
| 33 <body onload="loaded()" /> | |
| OLD | NEW |