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

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

Issue 857093003: Implemented explicit resizing from guestview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 11 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 ed2e6eeea2d7b1d21d401f9e7c7ecf3ea94c6623..97dcc1a36fb0f0c71974879c26d534250119a7b4 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
@@ -198,6 +198,8 @@ function testAutosizeAfterNavigation() {
var webview = document.createElement('webview');
var step = 1;
+ var autosizeWidth = -1;
+ var autosizeHeight = -1;
var sizeChangeHandler = function(e) {
switch (step) {
case 1:
@@ -207,14 +209,15 @@ function testAutosizeAfterNavigation() {
embedder.test.assertTrue(e.newWidth >= 60 && e.newWidth <= 70);
embedder.test.assertTrue(e.newHeight >= 110 && e.newHeight <= 120);
- // Remove autosize attribute and expect webview to return to its
- // original size.
+ // Remove autosize attribute and expect webview to retain the same size.
+ autosizeWidth = e.newWidth;
+ autosizeHeight = e.newHeight;
webview.removeAttribute('autosize');
break;
case 2:
- // Expect 50x100.
- embedder.test.assertEq(50, e.newWidth);
- embedder.test.assertEq(100, e.newHeight);
+ // Expect the autosized size.
+ embedder.test.assertEq(autosizeWidth, e.newWidth);
+ embedder.test.assertEq(autosizeHeight, e.newHeight);
embedder.test.succeed();
break;

Powered by Google App Engine
This is Rietveld 408576698