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

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

Issue 847893002: Implemented explicit resizing from guestview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another small fix. 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 58c18745c39ed38d1d2c64979f8a533632381e67..3289d8e0d6ebc3cd1abc16e6ba19cb01e7ac6e89 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;
« no previous file with comments | « chrome/renderer/resources/extensions/extension_options.js ('k') | extensions/browser/api/guest_view/guest_view_internal_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698