| Index: third_party/WebKit/LayoutTests/scrollbars/custom-scrollbar-reconstruction-document-write.html
|
| diff --git a/third_party/WebKit/LayoutTests/scrollbars/custom-scrollbar-reconstruction-document-write.html b/third_party/WebKit/LayoutTests/scrollbars/custom-scrollbar-reconstruction-document-write.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f23909750486163b13b10726588af153985e6edc
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/scrollbars/custom-scrollbar-reconstruction-document-write.html
|
| @@ -0,0 +1,25 @@
|
| +<!DOCTYPE html>
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +<iframe></iframe>
|
| +<script>
|
| +
|
| +function writeDoc() {
|
| + var doc = document.querySelector("iframe").contentDocument;
|
| + doc.open();
|
| + doc.write(`
|
| + <style>
|
| + ::-webkit-scrollbar-thumb { background-color: blue; }
|
| + ::-webkit-scrollbar { width: 50px; height: 50px; }
|
| + body { height: 400px; overflow: scroll; }
|
| + </style>`);
|
| + doc.close();
|
| + assert_equals(doc.documentElement.offsetWidth, 250);
|
| +}
|
| +
|
| +test(() => {
|
| + writeDoc();
|
| + writeDoc();
|
| +}, "Preserve iframe custom scrollbar after replacing contents with document.write.");
|
| +
|
| +</script>
|
|
|