Chromium Code Reviews| 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..9abb01c63f5b30c880ba13a95629ed8345ed0303 |
| --- /dev/null |
| +++ b/LayoutTests/scrollbars/custom-scrollbar-changing-style.html |
| @@ -0,0 +1,34 @@ |
| +<!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.waitUntilDone(); |
| +var styleElement = document.createElement("style"); |
| +var sheet = document.head.appendChild(styleElement).sheet; |
| +function addRule(selector, css){ |
| + var propText = Object.keys(css).map(function(p){ |
| + return p+":"+css[p] |
| + }).join(";"); |
| + sheet.insertRule(selector + "{" + propText + "}", sheet.cssRules.length); |
| +}; |
| +function addstyle() { |
| + addRule("::-webkit-scrollbar-thumb", { |
| + background: "rgba(13,53,178,0.8)", |
| + }); |
| + if (window.testRunner) |
| + testRunner.notifyDone(); |
| +}; |
| +setTimeout(function() {addstyle();}, 1); |
|
rune
2014/11/07 10:58:08
I still think it would be more robust if you put t
MuVen
2014/11/07 11:33:54
Done.
|
| +</script> |
| +<div style="height:700px"></div> |