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

Unified Diff: LayoutTests/fast/images/zoomed-img-height-acid3.html

Issue 251063002: Use plus/minus 0.5 instead of 1 when calculating zoomed length. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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
« no previous file with comments | « no previous file | LayoutTests/fast/images/zoomed-img-height-acid3-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/images/zoomed-img-height-acid3.html
diff --git a/LayoutTests/fast/images/zoomed-img-height-acid3.html b/LayoutTests/fast/images/zoomed-img-height-acid3.html
new file mode 100644
index 0000000000000000000000000000000000000000..b29ff86ee441bcbb938539a7ad9374969c9072c7
--- /dev/null
+++ b/LayoutTests/fast/images/zoomed-img-height-acid3.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style type="text/css">
+ img { height: 10px; }
+ </style>
+ <script type="text/javascript">
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ function test() {
+ // The factors are the same as those in Chrome settings.
+ var zoomFactors = [1, 1.1, 1.25, 1.5, 1.75, 2, 2.5, 3, 4, 5];
+ if (!window.eventSender)
+ return;
+
+ for (i = 0; i < zoomFactors.length; ++i) {
+ var output = document.getElementById('output');
+ eventSender.setPageZoomFactor(zoomFactors[i]);
+ if (document.images[0].height == 10)
+ output.innerHTML += "PASS: zoom " + Math.round(zoomFactors[i] * 100) + "%<br>";
+ else
+ output.innerHTML += "FAIL: zoom " + Math.round(zoomFactors[i] * 100) + "%, height " + document.images[0].height + " != 10<br>";
+ }
+ }
+ window.onload = test;
+ </script>
+ </head>
+ <body>
+ This test is minimized from Acid3 Test #72.<br>
+ <img src="data:image/gif;base64,R0lGODlhAQABAID%2FAMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEA1w%3D%3D" alt="">
+ <div id="output"></div>
+ </body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/images/zoomed-img-height-acid3-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698