| OLD | NEW |
| 1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
| 2 <script src="resources/composited-scroll.js"></script> | 2 <script src="resources/composited-scroll.js"></script> |
| 3 <style> | 3 <style> |
| 4 #scroller { | 4 #scroller { |
| 5 overflow: scroll; | 5 overflow: scroll; |
| 6 height: 300px; | 6 height: 300px; |
| 7 width: 300px; | 7 width: 300px; |
| 8 background-color: red; | 8 background-color: red; |
| 9 } | 9 } |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 if (window.testRunner) { | 34 if (window.testRunner) { |
| 35 window.testRunner.dumpAsText(); | 35 window.testRunner.dumpAsText(); |
| 36 window.testRunner.waitUntilDone(); | 36 window.testRunner.waitUntilDone(); |
| 37 } | 37 } |
| 38 | 38 |
| 39 var result = ""; | 39 var result = ""; |
| 40 | 40 |
| 41 onload = function() { | 41 onload = function() { |
| 42 if (window.internals) { | 42 if (window.internals) { |
| 43 result += "No border radius (should be using composited scrolling): "; | 43 result += "No border radius (should be using composited scrolling): "; |
| 44 if (isUsingCompositedScrolling(JSON.parse(window.internals.layerTreeAsTe
xt(document, window.internals.OUTPUT_CHILDREN_AS_LAYER_LIST)))) | 44 if (isUsingCompositedScrolling(JSON.parse(window.internals.layerTreeAsTe
xt(document)))) |
| 45 result += "Pass.\n"; | 45 result += "Pass.\n"; |
| 46 else | 46 else |
| 47 result += "Fail.\n" | 47 result += "Fail.\n" |
| 48 } | 48 } |
| 49 document.getElementById("scroller").style.borderRadius = '5px'; | 49 document.getElementById("scroller").style.borderRadius = '5px'; |
| 50 requestAnimationFrame(function() { | 50 requestAnimationFrame(function() { |
| 51 if (window.internals) { | 51 if (window.internals) { |
| 52 result += "Has border radius (should not be using composited scrolli
ng): "; | 52 result += "Has border radius (should not be using composited scrolli
ng): "; |
| 53 if (!isUsingCompositedScrolling(JSON.parse(window.internals.layerTre
eAsText(document, window.internals.OUTPUT_CHILDREN_AS_LAYER_LIST)))) | 53 if (!isUsingCompositedScrolling(JSON.parse(window.internals.layerTre
eAsText(document)))) |
| 54 result += "Pass.\n"; | 54 result += "Pass.\n"; |
| 55 else | 55 else |
| 56 result += "Fail.\n" | 56 result += "Fail.\n" |
| 57 } | 57 } |
| 58 | 58 |
| 59 if (window.testRunner) { | 59 if (window.testRunner) { |
| 60 window.testRunner.setCustomTextOutput(result); | 60 window.testRunner.setCustomTextOutput(result); |
| 61 window.testRunner.notifyDone(); | 61 window.testRunner.notifyDone(); |
| 62 } | 62 } |
| 63 }); | 63 }); |
| 64 }; | 64 }; |
| 65 </script> | 65 </script> |
| OLD | NEW |