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

Unified Diff: extensions/test/data/web_view/apitest/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
« no previous file with comments | « extensions/renderer/resources/guest_view/web_view_attributes.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/test/data/web_view/apitest/main.js
diff --git a/extensions/test/data/web_view/apitest/main.js b/extensions/test/data/web_view/apitest/main.js
index 29bfdc3df63736307f3f4a2dbd5eb947bf5c610d..2aae0bf13c822b60f4cca66b31ab108d4e059611 100644
--- a/extensions/test/data/web_view/apitest/main.js
+++ b/extensions/test/data/web_view/apitest/main.js
@@ -165,6 +165,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:
@@ -174,14 +176,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 | « extensions/renderer/resources/guest_view/web_view_attributes.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698