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

Unified Diff: chrome/test/data/extensions/platform_apps/web_view/shim/main.js

Issue 23499003: Improve <webview> autosize: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add UMA for autosize. Created 7 years, 4 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: chrome/test/data/extensions/platform_apps/web_view/shim/main.js
diff --git a/chrome/test/data/extensions/platform_apps/web_view/shim/main.js b/chrome/test/data/extensions/platform_apps/web_view/shim/main.js
index 6234971e0ad3d5c2de0e1959ca2610fa8dd07a80..b76cd85b9a2d0316d1c5d845afa6bcb0a207d1b0 100644
--- a/chrome/test/data/extensions/platform_apps/web_view/shim/main.js
+++ b/chrome/test/data/extensions/platform_apps/web_view/shim/main.js
@@ -184,14 +184,13 @@ function testAutosizeWithPartialAttributes() {
embedder.test.assertEq(640, e.newWidth);
// Tests when minwidth > maxwidth, minwidth = maxwidth.
- webview.maxheight = null;
webview.minwidth = 800;
- webview.minheight = 800;
break;
case 3:
- // Expect 700X480
+ // Expect 700X?
embedder.test.assertEq(700, e.newWidth);
- embedder.test.assertEq(480, e.newHeight);
+ embedder.test.assertTrue(e.newHeight >= 200);
+ embedder.test.assertTrue(e.newHeight <= 600);
// Remove maxwidth and make sure the size returns to plugin size.
webview.removeAttribute('maxwidth');
@@ -199,7 +198,8 @@ function testAutosizeWithPartialAttributes() {
case 4:
// Expect original size, 640x480.
embedder.test.assertEq(640, e.newWidth);
- embedder.test.assertEq(480, e.newHeight);
+ embedder.test.assertTrue(e.newHeight >= 200);
+ embedder.test.assertTrue(e.newHeight <= 600);
embedder.test.succeed();
break;

Powered by Google App Engine
This is Rietveld 408576698