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

Unified Diff: ash/test/ash_test_base.cc

Issue 2847283002: chromeos: convert remaining AshTest usage to AshTestBase (Closed)
Patch Set: comment Created 3 years, 8 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 | « ash/test/ash_test_base.h ('k') | ash/test/ash_test_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/ash_test_base.cc
diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc
index 5e62df8ab677ee399a5bb03f579e72c64e93f9b3..2c22ca48476a739fcd36ce4335b4e56900e445e8 100644
--- a/ash/test/ash_test_base.cc
+++ b/ash/test/ash_test_base.cc
@@ -288,10 +288,27 @@ std::unique_ptr<aura::Window> AshTestBase::CreateTestWindow(
ash_test_helper_->window_manager_app()->window_manager();
aura::Window* window = mus::CreateAndParentTopLevelWindow(
window_manager, mus_window_type, &properties);
+ window->set_id(shell_window_id);
window->Show();
return base::WrapUnique<aura::Window>(window);
}
+std::unique_ptr<aura::Window> AshTestBase::CreateToplevelTestWindow(
+ const gfx::Rect& bounds_in_screen,
+ int shell_window_id) {
+ if (AshTestHelper::config() == Config::MASH) {
+ return CreateTestWindow(bounds_in_screen, ui::wm::WINDOW_TYPE_NORMAL,
+ shell_window_id);
+ }
+
+ aura::test::TestWindowDelegate* delegate =
+ aura::test::TestWindowDelegate::CreateSelfDestroyingDelegate();
+ return base::WrapUnique<aura::Window>(
+ CreateTestWindowInShellWithDelegateAndType(
+ delegate, ui::wm::WINDOW_TYPE_NORMAL, shell_window_id,
+ bounds_in_screen));
+}
+
aura::Window* AshTestBase::CreateTestWindowInShellWithId(int id) {
return CreateTestWindowInShellWithDelegate(NULL, id, gfx::Rect());
}
« no previous file with comments | « ash/test/ash_test_base.h ('k') | ash/test/ash_test_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698