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

Unified Diff: ash/shell_unittest.cc

Issue 11273059: ash: Clean up system background layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: apply review feedback Created 8 years, 2 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/root_window_controller.cc ('k') | ash/shell_window_ids.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell_unittest.cc
diff --git a/ash/shell_unittest.cc b/ash/shell_unittest.cc
index d9f1eb5cd6ca57ef2706066152643b62d08f5bf7..635df889fa4018644aad7451c07cb353f042e504 100644
--- a/ash/shell_unittest.cc
+++ b/ash/shell_unittest.cc
@@ -55,8 +55,6 @@ void ExpectAllContainers() {
EXPECT_TRUE(Shell::GetContainer(
root_window, internal::kShellWindowId_DesktopBackgroundContainer));
EXPECT_TRUE(Shell::GetContainer(
- root_window, internal::kShellWindowId_SystemBackgroundContainer));
- EXPECT_TRUE(Shell::GetContainer(
root_window, internal::kShellWindowId_DefaultContainer));
EXPECT_TRUE(Shell::GetContainer(
root_window, internal::kShellWindowId_AlwaysOnTopContainer));
@@ -353,45 +351,6 @@ std::vector<aura::Window*> BuildPathToRoot(aura::Window* window) {
} // namespace
-// The SystemBackgroundContainer needs to be behind the
-// DesktopBackgroundContainer, otherwise workspace animations don't line up.
-TEST_F(ShellTest, SystemBackgroundBehindDesktopBackground) {
- aura::RootWindow* root_window = Shell::GetPrimaryRootWindow();
- aura::Window* desktop = Shell::GetContainer(
- root_window, internal::kShellWindowId_DesktopBackgroundContainer);
- ASSERT_TRUE(desktop != NULL);
- aura::Window* system_bg = Shell::GetContainer(
- root_window, internal::kShellWindowId_SystemBackgroundContainer);
- ASSERT_TRUE(system_bg != NULL);
-
- std::vector<aura::Window*> desktop_parents(BuildPathToRoot(desktop));
- std::vector<aura::Window*> system_bg_parents(BuildPathToRoot(system_bg));
-
- for (size_t i = 0; i < system_bg_parents.size(); ++i) {
- std::vector<aura::Window*>::iterator desktop_i =
- std::find(desktop_parents.begin(), desktop_parents.end(),
- system_bg_parents[i]);
- if (desktop_i != desktop_parents.end()) {
- // Found the common parent.
- ASSERT_NE(0u, i);
- ASSERT_TRUE(desktop_i != desktop_parents.begin());
- aura::Window* common_parent = system_bg_parents[i];
- int system_child = static_cast<int>(std::find(
- common_parent->children().begin(),
- common_parent->children().end(), system_bg_parents[i - 1]) -
- common_parent->children().begin());
- int desktop_child = static_cast<int>(std::find(
- common_parent->children().begin(),
- common_parent->children().end(), *(desktop_i - 1)) -
- common_parent->children().begin());
- EXPECT_LT(system_child, desktop_child);
- return;
- }
- }
- EXPECT_TRUE(false) <<
- "system background and desktop background need to have a common parent";
-}
-
// Various assertions around IsAutoHideMenuHideChecked() and
// ToggleAutoHideMenu().
TEST_F(ShellTest, ToggleAutoHide) {
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/shell_window_ids.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698