Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / compositing / overflow / opt-in-if-composited.html
blobb73087ddf3ad1db0a22ca943801bfef0c6d8750e
1 <!DOCTYPE HTML>
2 <script>
3 if (window.internals)
4 window.internals.settings.setPreferCompositingToLCDTextEnabled(false);
6 if (window.testRunner) {
7 window.testRunner.dumpAsText();
8 window.testRunner.waitUntilDone();
11 function isUsingCompositedScrolling(layer) {
12 if (layer.bounds[1] == 1000)
13 return true;
14 if (layer.children) {
15 for (var i = 0; i < layer.children.length; i++) {
16 if (isUsingCompositedScrolling(layer.children[i]))
17 return true;
20 return false;
23 var result = "";
24 onload = function() {
26 if (window.internals) {
27 result += "Should not be using composited scrolling: ";
28 if (!isUsingCompositedScrolling(JSON.parse(window.internals.layerTreeAsText(document))))
29 result += "Pass.\n";
30 else
31 result += "Fail.\n"
34 document.getElementById("scroller").style.webkitTransform = "translateZ(0)";
35 requestAnimationFrame(function() {
36 if (window.internals) {
37 result += "Should be using composited scrolling (since we're compositing anyhow): ";
38 if (isUsingCompositedScrolling(JSON.parse(window.internals.layerTreeAsText(document))))
39 result += "Pass.\n";
40 else
41 result += "Fail.\n"
44 document.getElementById("scroller").style.webkitTransform = "";
45 requestAnimationFrame(function() {
46 if (window.internals) {
47 result += "Should not be using composited scrolling (since we've lost our direct reason): ";
48 if (!isUsingCompositedScrolling(JSON.parse(window.internals.layerTreeAsText(document))))
49 result += "Pass.\n";
50 else
51 result += "Fail.\n"
54 if (window.testRunner) {
55 window.testRunner.setCustomTextOutput(result);
56 window.testRunner.notifyDone();
58 });
59 });
61 </script>
62 <div id="scroller" style="overflow:scroll; width:100px; height:100px">
63 <div id="tall" style="background: green; width:50px; height: 1000px"></div>
64 </div>