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

Unified Diff: chrome/test/data/pdf/test_util.js

Issue 931013002: OOP PDF: Fix incorrect scrolling during fit-to-page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « chrome/browser/resources/pdf/viewport.js ('k') | chrome/test/data/pdf/viewport_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/pdf/test_util.js
diff --git a/chrome/test/data/pdf/test_util.js b/chrome/test/data/pdf/test_util.js
index 8ea2a81cd9fd3ec609836f67690a9ee49ec1dea3..bf2093ae2d5d9706dbeee3c37c81e233583d4c14 100644
--- a/chrome/test/data/pdf/test_util.js
+++ b/chrome/test/data/pdf/test_util.js
@@ -12,6 +12,11 @@ function MockWindow(width, height, sizer) {
if (e == 'resize')
this.resizeCallback = f;
};
+ this.setSize = function(width, height) {
+ this.innerWidth = width;
+ this.innerHeight = height;
+ this.resizeCallback();
+ }
this.scrollTo = function(x, y) {
if (sizer) {
x = Math.min(x, parseInt(sizer.style.width) - width);
« no previous file with comments | « chrome/browser/resources/pdf/viewport.js ('k') | chrome/test/data/pdf/viewport_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698