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

Unified Diff: third_party/WebKit/LayoutTests/scrollbars/hidden-scrollbars-invisible.html

Issue 2509843004: Disable overlay scrollbars to hide them on non-Mac. (Closed)
Patch Set: Fix tests Created 4 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: third_party/WebKit/LayoutTests/scrollbars/hidden-scrollbars-invisible.html
diff --git a/third_party/WebKit/LayoutTests/scrollbars/hidden-scrollbars-invisible.html b/third_party/WebKit/LayoutTests/scrollbars/hidden-scrollbars-invisible.html
new file mode 100644
index 0000000000000000000000000000000000000000..babf84b5d60de326e166d2ef06d10310cc692708
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/scrollbars/hidden-scrollbars-invisible.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<script>
+if (window.internals) {
+ window.internals.settings.setOverlayScrollbarsEnabled(true);
+ window.internals.settings.setMockScrollbarsEnabled(true);
+}
+</script>
+<div id="div" style="overflow: scroll; width: 200px; height: 200px;">
+ <div style="background-color: green; height: 3000px; width: 100px"></div>
+</div>
+<iframe srcdoc="<div style='background-color: red; height: 3000px; width: 100px'></div>"
+ id="iframe",
+ width=200,
+ height=200></iframe>
+<script>
+ window.onload = function() {
+ if (window.internals) {
+ window.internals.settings.setOverlayScrollbarsEnabled(true);
skobes 2016/11/17 21:16:31 nit: you don't need "window." (except on the line
bokan 2016/11/17 23:22:27 Done.
+
+ var div = document.querySelector('#div');
+ var iframe = document.querySelector('#iframe');
+ window.internals.setScrollbarVisibilityInScrollableArea(div, true);
+ window.internals.setScrollbarVisibilityInScrollableArea(
+ iframe.contentDocument, true);
+
+ window.internals.setScrollbarVisibilityInScrollableArea(div, false);
+ window.internals.setScrollbarVisibilityInScrollableArea(
+ iframe.contentDocument, false);
+ }
+ }
+</script>

Powered by Google App Engine
This is Rietveld 408576698