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

Unified Diff: third_party/WebKit/LayoutTests/fast/hidpi/scrollbar-appearance-decrease-device-scale-factor.html

Issue 2377453004: Scrollbar width is set using thickness to compute correct rect size (Closed)
Patch Set: Added test expectations Created 4 years, 3 months 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/fast/hidpi/scrollbar-appearance-decrease-device-scale-factor.html
diff --git a/third_party/WebKit/LayoutTests/fast/hidpi/scrollbar-appearance-decrease-device-scale-factor.html b/third_party/WebKit/LayoutTests/fast/hidpi/scrollbar-appearance-decrease-device-scale-factor.html
new file mode 100644
index 0000000000000000000000000000000000000000..9fc4ffab717637775b6a2312630f0b8b81ca9ee8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/hidpi/scrollbar-appearance-decrease-device-scale-factor.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
Xianzhu 2016/09/30 03:36:14 Normally we omit <html>, <head>, <body> in layout
malaykeshav 2016/09/30 18:23:39 Done
+<script>
+ window.enablePixelTesting = true;
Xianzhu 2016/09/30 03:36:14 Please remove the above line. It's no use here. Y
malaykeshav 2016/09/30 18:23:39 Done
+ function finishTest() {
+ setTimeout(function() {testRunner.notifyDone();}, 0);
Xianzhu 2016/09/30 03:36:14 Is the setTimeout necessary?
malaykeshav 2016/09/30 18:23:39 Removed.
+ }
+
+ function scaleDown() {
+ if (window.testRunner) {
+ testRunner.setBackingScaleFactor(1, finishTest);
+ }
+ }
+ function startTest() {
+ testRunner.waitUntilDone();
+ if (window.testRunner) {
Xianzhu 2016/09/30 03:36:14 Line 16 should be also protected by if (window.tes
malaykeshav 2016/09/30 18:23:39 Done
+ testRunner.setBackingScaleFactor(3, scaleDown);
+ }
+ }
+
+ window.addEventListener("load", startTest, false);
Xianzhu 2016/09/30 03:36:14 You can use shorter form: onload = startTest; or
malaykeshav 2016/09/30 18:23:39 Done
+</script>
+</head>
+<body>
+<div id="div" style="width:200px; height:120px; overflow:auto">
+ <br>This should be a scrollable text box with horizontal and vertical scroll.
+ <div style="width:400px; height: 200px; background-color:red"></div>
Xianzhu 2016/09/30 03:36:14 Remove "background-color: red". Normally we use re
malaykeshav 2016/09/30 18:23:39 Done
+</div>
+</body>
+</html>
Xianzhu 2016/09/30 03:36:14 We prefer reference tests to pixel tests because t
malaykeshav 2016/09/30 18:23:39 The two files will not be _exactly_ the same due t
Xianzhu 2016/09/30 18:36:20 This looks weird to me. The final scale is 1 which

Powered by Google App Engine
This is Rietveld 408576698