diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-19 13:15:40 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-19 13:15:40 +0000 |
commit | 59253838dff6df06206732fce124b176d6ca0b6e (patch) | |
tree | a161ff1affa84e76f1509b06496e753f06dee388 /content/shell | |
parent | 044752edcf1fa9fd9526db140a072fda9318834c (diff) | |
download | chromium_src-59253838dff6df06206732fce124b176d6ca0b6e.zip chromium_src-59253838dff6df06206732fce124b176d6ca0b6e.tar.gz chromium_src-59253838dff6df06206732fce124b176d6ca0b6e.tar.bz2 |
Revert 173751
> [content shell] run headless when in layout test mode
>
> Currently only for gtk. There's also a command line flag --show-content-shell
> which overrides this for debugging
>
> BUG=111316
> TEST=nothing should change
> R=marja@chromium.org
>
>
> Review URL: https://chromiumcodereview.appspot.com/11576003
TBR=jochen@chromium.org
Review URL: https://codereview.chromium.org/11649017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173908 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell')
-rw-r--r-- | content/shell/shell.cc | 11 | ||||
-rw-r--r-- | content/shell/shell.h | 2 | ||||
-rw-r--r-- | content/shell/shell_gtk.cc | 24 | ||||
-rw-r--r-- | content/shell/shell_switches.cc | 3 | ||||
-rw-r--r-- | content/shell/shell_switches.h | 1 |
5 files changed, 5 insertions, 36 deletions
diff --git a/content/shell/shell.cc b/content/shell/shell.cc index a89af8a..f21b6f9 100644 --- a/content/shell/shell.cc +++ b/content/shell/shell.cc @@ -45,16 +45,11 @@ Shell::Shell(WebContents* web_contents) : dev_tools_(NULL), is_fullscreen_(false), window_(NULL), - url_edit_view_(NULL), + url_edit_view_(NULL) #if defined(OS_WIN) && !defined(USE_AURA) - default_edit_wnd_proc_(0), + , default_edit_wnd_proc_(0) #endif - headless_(false) { - const CommandLine& command_line = *CommandLine::ForCurrentProcess(); - if (command_line.HasSwitch(switches::kDumpRenderTree) && - !command_line.HasSwitch(switches::kShowContentShell)) { - headless_ = true; - } + { registrar_.Add(this, NOTIFICATION_WEB_CONTENTS_TITLE_UPDATED, Source<WebContents>(web_contents)); windows_.push_back(this); diff --git a/content/shell/shell.h b/content/shell/shell.h index 748f9e6..24173b9 100644 --- a/content/shell/shell.h +++ b/content/shell/shell.h @@ -242,8 +242,6 @@ class Shell : public WebContentsDelegate, views::Widget* window_widget_; #endif - bool headless_; - // A container of all the open windows. We use a vector so we can keep track // of ordering. static std::vector<Shell*> windows_; diff --git a/content/shell/shell_gtk.cc b/content/shell/shell_gtk.cc index 8365ea1..2cfbc47 100644 --- a/content/shell/shell_gtk.cc +++ b/content/shell/shell_gtk.cc @@ -62,9 +62,6 @@ void Shell::PlatformCleanUp() { } void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) { - if (headless_) - return; - GtkToolItem* item = NULL; switch (control) { case BACK_BUTTON: @@ -84,16 +81,10 @@ void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) { } void Shell::PlatformSetAddressBarURL(const GURL& url) { - if (headless_) - return; - gtk_entry_set_text(GTK_ENTRY(url_edit_view_), url.spec().c_str()); } void Shell::PlatformSetIsLoading(bool loading) { - if (headless_) - return; - if (loading) gtk_spinner_start(GTK_SPINNER(spinner_)); else @@ -101,9 +92,6 @@ void Shell::PlatformSetIsLoading(bool loading) { } void Shell::PlatformCreateWindow(int width, int height) { - if (headless_) - return; - window_ = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL)); gtk_window_set_title(window_, "Content Shell"); g_signal_connect(G_OBJECT(window_), "destroy", @@ -199,9 +187,6 @@ void Shell::PlatformCreateWindow(int width, int height) { } void Shell::PlatformSetContents() { - if (headless_) - return; - WebContentsView* content_view = web_contents_->GetView(); gtk_container_add(GTK_CONTAINER(vbox_), content_view->GetNativeView()); } @@ -209,8 +194,9 @@ void Shell::PlatformSetContents() { void Shell::SizeTo(int width, int height) { content_width_ = width; content_height_ = height; - if (web_contents_.get()) + if (web_contents_.get()) { gtk_widget_set_size_request(web_contents_->GetNativeView(), width, height); + } } void Shell::PlatformResizeSubViews() { @@ -218,9 +204,6 @@ void Shell::PlatformResizeSubViews() { } void Shell::Close() { - if (headless_) - return; - gtk_widget_destroy(GTK_WIDGET(window_)); } @@ -286,9 +269,6 @@ gboolean Shell::OnHighlightURLView(GtkAccelGroup* accel_group, } void Shell::PlatformSetTitle(const string16& title) { - if (headless_) - return; - std::string title_utf8 = UTF16ToUTF8(title); gtk_window_set_title(GTK_WINDOW(window_), title_utf8.c_str()); } diff --git a/content/shell/shell_switches.cc b/content/shell/shell_switches.cc index df50d5e..be7f7cd 100644 --- a/content/shell/shell_switches.cc +++ b/content/shell/shell_switches.cc @@ -27,7 +27,4 @@ const char kNoTimeout[] = "no-timeout"; // Save results when layout-as-browser tests fail. const char kOutputLayoutTestDifferences[] = "output-layout-test-differences"; -// Show the content_shell window, even when running in layout test mode. -const char kShowContentShell[] = "show-content-shell"; - } // namespace switches diff --git a/content/shell/shell_switches.h b/content/shell/shell_switches.h index e261bf3..c440013 100644 --- a/content/shell/shell_switches.h +++ b/content/shell/shell_switches.h @@ -16,7 +16,6 @@ extern const char kContentShellDataPath[]; extern const char kDumpRenderTree[]; extern const char kNoTimeout[]; extern const char kOutputLayoutTestDifferences[]; -extern const char kShowContentShell[]; } // namespace switches |