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

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

Issue 659093002: Pass the size to the RenderView on creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@java_enum
Patch Set: fix autoresize for guestview/extensions Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/compositor/delegated_frame_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var util = {}; 5 var util = {};
6 var embedder = {}; 6 var embedder = {};
7 embedder.baseGuestURL = ''; 7 embedder.baseGuestURL = '';
8 embedder.emptyGuestURL = ''; 8 embedder.emptyGuestURL = '';
9 embedder.windowOpenGuestURL = ''; 9 embedder.windowOpenGuestURL = '';
10 embedder.noReferrerGuestURL = ''; 10 embedder.noReferrerGuestURL = '';
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 webview.autosize = true; 133 webview.autosize = true;
134 webview.minwidth = 200; 134 webview.minwidth = 200;
135 webview.maxwidth = 210; 135 webview.maxwidth = 210;
136 webview.minheight = 40; 136 webview.minheight = 40;
137 webview.maxheight = 200; 137 webview.maxheight = 200;
138 138
139 var step = 1; 139 var step = 1;
140 webview.addEventListener('sizechanged', function(e) { 140 webview.addEventListener('sizechanged', function(e) {
141 switch (step) { 141 switch (step) {
142 case 1: 142 case 1:
143 embedder.test.assertEq(0, e.oldHeight);
144 embedder.test.assertEq(200, e.newHeight); 143 embedder.test.assertEq(200, e.newHeight);
145 // Change the maxheight to verify that we see the change. 144 // Change the maxheight to verify that we see the change.
146 webview.maxheight = 50; 145 webview.maxheight = 50;
147 break; 146 break;
148 case 2: 147 case 2:
149 embedder.test.assertEq(200, e.oldHeight); 148 embedder.test.assertEq(200, e.oldHeight);
150 embedder.test.assertEq(50, e.newHeight); 149 embedder.test.assertEq(50, e.newHeight);
151 embedder.test.succeed(); 150 embedder.test.succeed();
152 break; 151 break;
153 default: 152 default:
(...skipping 1906 matching lines...) Expand 10 before | Expand all | Expand 10 after
2060 'testFindAPI_findupdate': testFindAPI, 2059 'testFindAPI_findupdate': testFindAPI,
2061 'testLoadDataAPI': testLoadDataAPI 2060 'testLoadDataAPI': testLoadDataAPI
2062 }; 2061 };
2063 2062
2064 onload = function() { 2063 onload = function() {
2065 chrome.test.getConfig(function(config) { 2064 chrome.test.getConfig(function(config) {
2066 embedder.setUp_(config); 2065 embedder.setUp_(config);
2067 chrome.test.sendMessage("Launched"); 2066 chrome.test.sendMessage("Launched");
2068 }); 2067 });
2069 }; 2068 };
OLDNEW
« no previous file with comments | « no previous file | content/browser/compositor/delegated_frame_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698