diff options
author | mukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-01 03:11:29 +0000 |
---|---|---|
committer | mukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-01 03:11:29 +0000 |
commit | c7283444a26c8f23dca69fb0d511b6309e7c91bb (patch) | |
tree | d6847eae6765c03b9b955e0809ab63626ed2f3db /ash/test/ash_test_helper.cc | |
parent | f37ff7167ee2ac92e6643a7587af74b880c86b89 (diff) | |
download | chromium_src-c7283444a26c8f23dca69fb0d511b6309e7c91bb.zip chromium_src-c7283444a26c8f23dca69fb0d511b6309e7c91bb.tar.gz chromium_src-c7283444a26c8f23dca69fb0d511b6309e7c91bb.tar.bz2 |
Cleanup: merge separate implementaions of ScreenshotDelegate for tests.
BUG=None
R=oshima@chromium.org
TEST=ash_unittests
Review URL: https://codereview.chromium.org/24257015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226118 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/test/ash_test_helper.cc')
-rw-r--r-- | ash/test/ash_test_helper.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ash/test/ash_test_helper.cc b/ash/test/ash_test_helper.cc index 28c652f..469504b 100644 --- a/ash/test/ash_test_helper.cc +++ b/ash/test/ash_test_helper.cc @@ -4,10 +4,12 @@ #include "ash/test/ash_test_helper.h" +#include "ash/accelerators/accelerator_controller.h" #include "ash/ash_switches.h" #include "ash/shell.h" #include "ash/test/display_manager_test_api.h" #include "ash/test/shell_test_api.h" +#include "ash/test/test_screenshot_delegate.h" #include "ash/test/test_session_state_delegate.h" #include "ash/test/test_shell_delegate.h" #include "ash/test/test_system_tray_delegate.h" @@ -33,6 +35,7 @@ namespace test { AshTestHelper::AshTestHelper(base::MessageLoopForUI* message_loop) : message_loop_(message_loop), test_shell_delegate_(NULL), + test_screenshot_delegate_(NULL), tear_down_network_handler_(false) { CHECK(message_loop_); #if defined(USE_X11) @@ -82,11 +85,16 @@ void AshTestHelper::SetUp(bool start_session) { test::DisplayManagerTestApi(shell->display_manager()). DisableChangeDisplayUponHostResize(); ShellTestApi(shell).DisableOutputConfiguratorAnimation(); + + test_screenshot_delegate_ = new TestScreenshotDelegate(); + shell->accelerator_controller()->SetScreenshotDelegate( + scoped_ptr<ScreenshotDelegate>(test_screenshot_delegate_)); } void AshTestHelper::TearDown() { // Tear down the shell. Shell::DeleteInstance(); + test_screenshot_delegate_ = NULL; // Remove global message center state. message_center::MessageCenter::Shutdown(); |