Index: ash/shell_unittest.cc |
diff --git a/ash/shell_unittest.cc b/ash/shell_unittest.cc |
index 881b9720eaa88ff0e3394fd01e08b026ba6d6ed8..25127c1487994a68e6b6151be3adfd11df3ed6e4 100644 |
--- a/ash/shell_unittest.cc |
+++ b/ash/shell_unittest.cc |
@@ -21,6 +21,7 @@ |
#include "ash/test/ash_test_base.h" |
#include "ash/test/shell_test_api.h" |
#include "ash/wm/window_util.h" |
+#include "base/macros.h" |
#include "base/strings/utf_string_conversions.h" |
#include "base/threading/thread_task_runner_handle.h" |
#include "ui/aura/client/aura_constants.h" |
@@ -56,6 +57,12 @@ aura::Window* GetAlwaysOnTopContainer() { |
// Expect ALL the containers! |
void ExpectAllContainers() { |
+ // Validate no duplicate container IDs. |
+ const size_t all_shell_container_ids_size = arraysize(kAllShellContainerIds); |
+ std::set<int32_t> container_ids; |
+ for (size_t i = 0; i < all_shell_container_ids_size; ++i) |
+ EXPECT_TRUE(container_ids.insert(kAllShellContainerIds[i]).second); |
+ |
aura::Window* root_window = Shell::GetPrimaryRootWindow(); |
EXPECT_TRUE( |
Shell::GetContainer(root_window, kShellWindowId_WallpaperContainer)); |