Index: third_party/WebKit/LayoutTests/scrollbars/custom-scrollbar-reconstruction-on-inserting-style-sheet.html |
diff --git a/third_party/WebKit/LayoutTests/scrollbars/custom-scrollbar-reconstruction-on-inserting-style-sheet.html b/third_party/WebKit/LayoutTests/scrollbars/custom-scrollbar-reconstruction-on-inserting-style-sheet.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9b22948386cf32914ca75f9a53101f8e832a7d0e |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/scrollbars/custom-scrollbar-reconstruction-on-inserting-style-sheet.html |
@@ -0,0 +1,13 @@ |
+<!DOCTYPE html> |
+<iframe frameborder="0"></iframe> |
+<div id = "content"> |
+<div style="width: 400px; height: 400px"></div> |
+</div> |
+<script> |
+ var idoc = document.querySelector("iframe").contentDocument; |
+ var sheet = idoc.head.appendChild(idoc.createElement("style")).sheet; |
+ idoc.body.innerHTML = document.querySelector('#content').innerHTML; |
+ document.body.offsetTop; |
+ sheet.insertRule("::-webkit-scrollbar { width: 50px; height: 20px; }", 0); |
+ sheet.insertRule("::-webkit-scrollbar-thumb { background: green; }", 1); |
+ </script> |