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

Side by Side Diff: LayoutTests/scrollbars/custom-scrollbar-changing-style.html

Issue 702913002: Updating custom scrollbar style (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: added new test Created 6 years, 1 month 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 <style>
3 ::-webkit-scrollbar {
4 height: 10px;
5 width: 10px
6 }
7 ::-webkit-scrollbar-thumb {
8 background: rgba(255,0,0,0.8);
9 }
10 html {
11 overflow-y: scroll;
12 }
13 </style>
14 <script>
15 if (window.testRunner) {
16 testRunner.dumpAsTextWithPixelResults();
rune 2014/11/06 16:44:27 You should try make a reference test instead. We s
MuVen 2014/11/06 17:35:15 Sure, will make ref test.
MuVen 2014/11/06 18:49:55 Done.
17 testRunner.waitUntilDone();
18 }
19
20 function addstyle(){
21 var addRule = (function(style){
22 var sheet = document.head.appendChild(style).sheet;
23 return function(selector, css){
24 var propText = Object.keys(css).map(function(p){
25 return p+":"+css[p]
26 }).join(";");
27 sheet.insertRule(selector + "{" + propText + "}", sheet.cssRules.len gth);
28 }
29 })(document.createElement("style"));
30
31 addRule("::-webkit-scrollbar-thumb", {
32 background: "rgba(13,53,178,0.8)",
33 });
34 if (window.testRunner)
35 testRunner.notifyDone();
36 };
37
38 setTimeout(function() {addstyle();}, 1000);
rune 2014/11/06 16:44:27 A one second timeout makes this test really slow.
MuVen 2014/11/06 17:35:15 Will make the timeout for 1 millisecond.Is that ok
MuVen 2014/11/06 18:49:55 Done.
39 </script>
40 <div style="height:700px">
41 Test is passed if you see blue scrollbar on the left.
42 </div>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698