Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / compositing / overflow / scroller-with-border-radius.html
blob3f408907eae96ee774f6e60ed37351769e5b9f77
1 <!DOCTYPE HTML>
2 <style>
3 #scroller {
4 overflow: scroll;
5 height: 300px;
6 width: 300px;
7 background-color: red;
10 #scrolled {
11 height: 1000px;
12 width: 250px;
13 background-color: green;
16 #fixed {
17 position: fixed;
18 height: 100px;
19 width: 100px;
20 background-color: green;
21 top: 400px;
22 left: 100px;
24 </style>
25 <div id="scroller">
26 <div id="scrolled"></div>
27 <div id="fixed"></div>
28 </div>
29 <script>
30 function isUsingCompositedScrolling(layer) {
31 if (layer.bounds[1] == 1000)
32 return true;
33 if (layer.children) {
34 for (var i = 0; i < layer.children.length; i++) {
35 if (isUsingCompositedScrolling(layer.children[i]))
36 return true;
39 return false;
42 if (window.internals)
43 window.internals.settings.setPreferCompositingToLCDTextEnabled(true);
45 if (window.testRunner) {
46 window.testRunner.dumpAsText();
47 window.testRunner.waitUntilDone();
50 var result = "";
52 onload = function() {
53 if (window.internals) {
54 result += "No border radius (should be using composited scrolling): ";
55 if (isUsingCompositedScrolling(JSON.parse(window.internals.layerTreeAsText(document))))
56 result += "Pass.\n";
57 else
58 result += "Fail.\n"
60 document.getElementById("scroller").style.borderRadius = '5px';
61 requestAnimationFrame(function() {
62 if (window.internals) {
63 result += "Has border radius (should not be using composited scrolling): ";
64 if (!isUsingCompositedScrolling(JSON.parse(window.internals.layerTreeAsText(document))))
65 result += "Pass.\n";
66 else
67 result += "Fail.\n"
70 if (window.testRunner) {
71 window.testRunner.setCustomTextOutput(result);
72 window.testRunner.notifyDone();
74 });
76 </script>