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

Side by Side Diff: chrome/test/base/browser_with_test_window_test.cc

Issue 250113002: Move DefaultActivationClient to wm/core (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
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 #include "chrome/test/base/browser_with_test_window_test.h" 5 #include "chrome/test/base/browser_with_test_window_test.h"
6 6
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "chrome/browser/profiles/profile_destroyer.h" 8 #include "chrome/browser/profiles/profile_destroyer.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_navigator.h" 10 #include "chrome/browser/ui/browser_navigator.h"
11 #include "chrome/browser/ui/tabs/tab_strip_model.h" 11 #include "chrome/browser/ui/tabs/tab_strip_model.h"
12 #include "chrome/common/render_messages.h" 12 #include "chrome/common/render_messages.h"
13 #include "chrome/test/base/testing_profile.h" 13 #include "chrome/test/base/testing_profile.h"
14 #include "content/public/browser/navigation_controller.h" 14 #include "content/public/browser/navigation_controller.h"
15 #include "content/public/browser/navigation_entry.h" 15 #include "content/public/browser/navigation_entry.h"
16 #include "content/public/browser/web_contents.h" 16 #include "content/public/browser/web_contents.h"
17 #include "content/public/common/page_transition_types.h" 17 #include "content/public/common/page_transition_types.h"
18 #include "content/public/test/test_renderer_host.h" 18 #include "content/public/test/test_renderer_host.h"
19 19
20 #if defined(USE_AURA) 20 #if defined(USE_AURA)
21 #include "ui/aura/test/aura_test_helper.h" 21 #include "ui/aura/test/aura_test_helper.h"
22 #include "ui/compositor/test/context_factories_for_test.h" 22 #include "ui/compositor/test/context_factories_for_test.h"
23 #include "ui/wm/core/default_activation_client.h"
23 #endif 24 #endif
24 25
25 #if defined(USE_ASH) 26 #if defined(USE_ASH)
26 #include "ash/test/ash_test_helper.h" 27 #include "ash/test/ash_test_helper.h"
27 #endif 28 #endif
28 29
29 #if defined(TOOLKIT_VIEWS) 30 #if defined(TOOLKIT_VIEWS)
30 #include "ui/views/test/test_views_delegate.h" 31 #include "ui/views/test/test_views_delegate.h"
31 #endif 32 #endif
32 33
(...skipping 30 matching lines...) Expand all
63 base::MessageLoopForUI::current())); 64 base::MessageLoopForUI::current()));
64 ash_test_helper_->SetUp(true); 65 ash_test_helper_->SetUp(true);
65 #elif defined(USE_AURA) 66 #elif defined(USE_AURA)
66 // The ContextFactory must exist before any Compositors are created. 67 // The ContextFactory must exist before any Compositors are created.
67 bool enable_pixel_output = false; 68 bool enable_pixel_output = false;
68 ui::InitializeContextFactoryForTests(enable_pixel_output); 69 ui::InitializeContextFactoryForTests(enable_pixel_output);
69 70
70 aura_test_helper_.reset(new aura::test::AuraTestHelper( 71 aura_test_helper_.reset(new aura::test::AuraTestHelper(
71 base::MessageLoopForUI::current())); 72 base::MessageLoopForUI::current()));
72 aura_test_helper_->SetUp(); 73 aura_test_helper_->SetUp();
74 new wm::DefaultActivationClient(aura_test_helper_->root_window());
73 #endif // USE_AURA 75 #endif // USE_AURA
74 #if defined(TOOLKIT_VIEWS) 76 #if defined(TOOLKIT_VIEWS)
75 views_delegate_.reset(CreateViewsDelegate()); 77 views_delegate_.reset(CreateViewsDelegate());
76 views::ViewsDelegate::views_delegate = views_delegate_.get(); 78 views::ViewsDelegate::views_delegate = views_delegate_.get();
77 #endif 79 #endif
78 80
79 // Subclasses can provide their own Profile. 81 // Subclasses can provide their own Profile.
80 profile_ = CreateProfile(); 82 profile_ = CreateProfile();
81 // Subclasses can provide their own test BrowserWindow. If they return NULL 83 // Subclasses can provide their own test BrowserWindow. If they return NULL
82 // then Browser will create the a production BrowserWindow and the subclass 84 // then Browser will create the a production BrowserWindow and the subclass
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 } 239 }
238 params.window = browser_window; 240 params.window = browser_window;
239 return new Browser(params); 241 return new Browser(params);
240 } 242 }
241 243
242 #if defined(TOOLKIT_VIEWS) 244 #if defined(TOOLKIT_VIEWS)
243 views::ViewsDelegate* BrowserWithTestWindowTest::CreateViewsDelegate() { 245 views::ViewsDelegate* BrowserWithTestWindowTest::CreateViewsDelegate() {
244 return new views::TestViewsDelegate; 246 return new views::TestViewsDelegate;
245 } 247 }
246 #endif 248 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc ('k') | chrome/test/base/view_event_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698