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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/scrollbars/custom-scrollbar-changing-style.html
diff --git a/LayoutTests/scrollbars/custom-scrollbar-changing-style.html b/LayoutTests/scrollbars/custom-scrollbar-changing-style.html
new file mode 100644
index 0000000000000000000000000000000000000000..37af412fae140fdfea384df392cea2fcecc2d37b
--- /dev/null
+++ b/LayoutTests/scrollbars/custom-scrollbar-changing-style.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<style>
+::-webkit-scrollbar {
+ height: 10px;
+ width: 10px
+}
+::-webkit-scrollbar-thumb {
+ background: rgba(255,0,0,0.8);
+}
+html {
+ overflow-y: scroll;
+}
+</style>
+<script>
+ if (window.testRunner) {
+ 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.
+ testRunner.waitUntilDone();
+ }
+
+ function addstyle(){
+ var addRule = (function(style){
+ var sheet = document.head.appendChild(style).sheet;
+ return function(selector, css){
+ var propText = Object.keys(css).map(function(p){
+ return p+":"+css[p]
+ }).join(";");
+ sheet.insertRule(selector + "{" + propText + "}", sheet.cssRules.length);
+ }
+ })(document.createElement("style"));
+
+ addRule("::-webkit-scrollbar-thumb", {
+ background: "rgba(13,53,178,0.8)",
+ });
+ if (window.testRunner)
+ testRunner.notifyDone();
+ };
+
+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.
+</script>
+<div style="height:700px">
+Test is passed if you see blue scrollbar on the left.
+</div>

Powered by Google App Engine
This is Rietveld 408576698