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

Unified Diff: ash/wm/activation_controller_unittest.cc

Issue 10857021: Prepare a bunch of ash tests for workspace2. With Workspace2 you can't (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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/shell_unittest.cc ('k') | ash/wm/frame_painter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/activation_controller_unittest.cc
diff --git a/ash/wm/activation_controller_unittest.cc b/ash/wm/activation_controller_unittest.cc
index 98f51950901d853fd7488d0fe6142e74042544bc..28e6976ddf655ff445f7a4c45ce78a759525270f 100644
--- a/ash/wm/activation_controller_unittest.cc
+++ b/ash/wm/activation_controller_unittest.cc
@@ -27,7 +27,7 @@
namespace {
// Containers used for the tests.
-const int c1 = ash::internal::kShellWindowId_DefaultContainer;
+const int kDefaultContainerID = -1; // Used to identify the default container.
const int c2 = ash::internal::kShellWindowId_AlwaysOnTopContainer;
const int c3 = ash::internal::kShellWindowId_LockScreenContainer;
@@ -72,10 +72,10 @@ class GetTopmostWindowToActivateTest : public ActivationControllerTest {
void CreateWindows() {
// Create four windows, the first and third are not activatable, the second
// and fourth are.
- w1_.reset(CreateWindow(1, &ad_1_, c1));
- w2_.reset(CreateWindow(2, &ad_2_, c1));
- w3_.reset(CreateWindow(3, &ad_3_, c1));
- w4_.reset(CreateWindow(4, &ad_4_, c1));
+ w1_.reset(CreateWindow(1, &ad_1_, kDefaultContainerID));
+ w2_.reset(CreateWindow(2, &ad_2_, kDefaultContainerID));
+ w3_.reset(CreateWindow(3, &ad_3_, kDefaultContainerID));
+ w4_.reset(CreateWindow(4, &ad_4_, kDefaultContainerID));
w5_.reset(CreateWindow(5, &ad_5_, c2));
w6_.reset(CreateWindow(6, &ad_6_, c2));
w7_.reset(CreateWindow(7, &ad_7_, c3));
@@ -84,11 +84,13 @@ class GetTopmostWindowToActivateTest : public ActivationControllerTest {
aura::Window* CreateWindow(int id,
TestActivationDelegate* delegate,
int container_id) {
+ aura::Window* parent = container_id == kDefaultContainerID ? NULL :
+ Shell::GetContainer(Shell::GetPrimaryRootWindow(), container_id);
aura::Window* window = aura::test::CreateTestWindowWithDelegate(
&delegate_,
id,
gfx::Rect(),
- Shell::GetContainer(Shell::GetPrimaryRootWindow(), container_id));
+ parent);
delegate->SetWindow(window);
return window;
}
« no previous file with comments | « ash/shell_unittest.cc ('k') | ash/wm/frame_painter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698