Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE HTML> | |
| 2 <script src="resources/composited-scroll.js"></script> | |
| 3 <style> | |
| 4 #scroller { | |
| 5 overflow: scroll; | |
| 6 height: 300px; | |
| 7 width: 300px; | |
| 8 background-color: red; | |
| 9 } | |
| 10 | |
| 11 #scrolled { | |
| 12 height: 1000px; | |
| 13 width: 250px; | |
| 14 background-color: green; | |
| 15 } | |
| 16 | |
| 17 #fixed { | |
| 18 position: fixed; | |
| 19 height: 100px; | |
| 20 width: 100px; | |
| 21 background-color: green; | |
| 22 top: 400px; | |
| 23 left: 100px; | |
| 24 } | |
| 25 </style> | |
| 26 <div id="scroller"> | |
| 27 <div id="scrolled"></div> | |
| 28 <div id="fixed"></div> | |
| 29 </div> | |
| 30 <script> | |
| 31 if (window.internals) | |
| 32 window.internals.settings.setPreferCompositingToLCDTextEnabled(true); | |
| 33 | |
| 34 if (window.testRunner) { | |
| 35 window.testRunner.dumpAsText(); | |
| 36 window.testRunner.waitUntilDone(); | |
| 37 } | |
| 38 | |
| 39 var result = ""; | |
| 40 | |
| 41 onload = function() { | |
| 42 if (window.internals) { | |
| 43 result += "No border radius (should be using composited scrolling): "; | |
| 44 if (isUsingCompositedScrolling(JSON.parse(window.internals.layerTreeAsTe xt(document)))) | |
| 45 result += "Pass.\n"; | |
| 46 else | |
| 47 result += "Fail.\n" | |
| 48 } | |
| 49 document.getElementById("scroller").style.borderRadius = '5px'; | |
| 50 requestAnimationFrame(function() { | |
| 51 if (window.internals) { | |
| 52 result += "Has border radius (should not be using composited scrolli ng): "; | |
|
chrishtr
2017/06/16 22:34:33
Instead of deleting, modify the test to expect com
sunxd
2017/06/20 14:36:10
Done.
| |
| 53 if (!isUsingCompositedScrolling(JSON.parse(window.internals.layerTre eAsText(document)))) | |
| 54 result += "Pass.\n"; | |
| 55 else | |
| 56 result += "Fail.\n" | |
| 57 } | |
| 58 | |
| 59 if (window.testRunner) { | |
| 60 window.testRunner.setCustomTextOutput(result); | |
| 61 window.testRunner.notifyDone(); | |
| 62 } | |
| 63 }); | |
| 64 }; | |
| 65 </script> | |
| OLD | NEW |