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

Unified Diff: content/shell/shell.cc

Issue 11828028: [content shell] W3C SVG tests need to run in a smaller window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 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 | « content/shell/shell.h ('k') | content/shell/shell_application_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/shell.cc
diff --git a/content/shell/shell.cc b/content/shell/shell.cc
index 5a6ce13d4bf502cfbff8dcbd93ca3487c952e31c..d4e68c04fa2d1dfecdb70af50e5d85e836a20472 100644
--- a/content/shell/shell.cc
+++ b/content/shell/shell.cc
@@ -29,7 +29,6 @@
#include "content/shell/shell_messages.h"
#include "content/shell/shell_switches.h"
#include "content/shell/webkit_test_controller.h"
-#include "ui/gfx/size.h"
// Content area size for newly created windows.
static const int kTestWindowWidth = 800;
@@ -121,15 +120,13 @@ Shell* Shell::CreateNewWindow(BrowserContext* browser_context,
const GURL& url,
SiteInstance* site_instance,
int routing_id,
- WebContents* base_web_contents) {
+ const gfx::Size& initial_size) {
WebContents::CreateParams create_params(browser_context, site_instance);
create_params.routing_id = routing_id;
- if (base_web_contents) {
- create_params.initial_size =
- base_web_contents->GetView()->GetContainerSize();
- } else {
+ if (!initial_size.IsEmpty())
+ create_params.initial_size = initial_size;
+ else
create_params.initial_size = gfx::Size(kTestWindowWidth, kTestWindowHeight);
- }
WebContents* web_contents = WebContents::Create(create_params);
Shell* shell = CreateShell(web_contents);
if (!url.is_empty())
@@ -185,7 +182,7 @@ void Shell::ShowDevTools() {
DevToolsAgentHost::GetFor(web_contents()->GetRenderViewHost()));
dev_tools_ = CreateNewWindow(
web_contents()->GetBrowserContext(),
- url, NULL, MSG_ROUTING_NONE, NULL);
+ url, NULL, MSG_ROUTING_NONE, gfx::Size());
}
void Shell::CloseDevTools() {
« no previous file with comments | « content/shell/shell.h ('k') | content/shell/shell_application_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698