diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-21 23:04:43 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-21 23:04:43 +0000 |
commit | 059feb38694d0e2f7b5c3596d832b2dae042e460 (patch) | |
tree | 21a5756e7cf305421859a40481fbea3809c25f1c | |
parent | 721f22964ba6e0c89102887d0fda8e8323d081ec (diff) | |
download | chromium_src-059feb38694d0e2f7b5c3596d832b2dae042e460.zip chromium_src-059feb38694d0e2f7b5c3596d832b2dae042e460.tar.gz chromium_src-059feb38694d0e2f7b5c3596d832b2dae042e460.tar.bz2 |
Correctly initialize and tear down aura shell windows during layout tests
R=dpranke@chromium.org
BUG=276728,276654
Review URL: https://chromiumcodereview.appspot.com/23371002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218854 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | content/shell/browser/shell_aura.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/content/shell/browser/shell_aura.cc b/content/shell/browser/shell_aura.cc index 03884da..dde0151 100644 --- a/content/shell/browser/shell_aura.cc +++ b/content/shell/browser/shell_aura.cc @@ -34,6 +34,11 @@ #include "ui/aura/test/test_screen.h" #endif +#if defined(OS_WIN) +#include <fcntl.h> +#include <io.h> +#endif + namespace content { namespace { @@ -279,6 +284,10 @@ views::ViewsDelegate* Shell::views_delegate_ = NULL; // static void Shell::PlatformInitialize(const gfx::Size& default_window_size) { +#if defined(OS_WIN) + _setmode(_fileno(stdout), _O_BINARY); + _setmode(_fileno(stderr), _O_BINARY); +#endif #if defined(OS_CHROMEOS) chromeos::DBusThreadManager::Initialize(); gfx::Screen::SetScreenInstance( @@ -292,6 +301,11 @@ void Shell::PlatformInitialize(const gfx::Size& default_window_size) { } void Shell::PlatformExit() { + std::vector<Shell*> windows = windows_; + for (std::vector<Shell*>::iterator it = windows.begin(); + it != windows.end(); ++it) { + (*it)->window_widget_->Close(); + } #if defined(OS_CHROMEOS) if (minimal_shell_) delete minimal_shell_; |