Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(594)

Side by Side Diff: third_party/WebKit/LayoutTests/compositing/overflow/scroller-with-border-radius.html

Issue 2859483006: cc: Enable composited border-radius scrolling.
Patch Set: test expectation Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698