Index: chrome/browser/ui/toolbar/wrench_menu_model_unittest.cc |
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model_unittest.cc b/chrome/browser/ui/toolbar/wrench_menu_model_unittest.cc |
index dd0882290585707b7294663383ec0c9878a62127..c7b2b0d0cf0a7f33bb2ca0bde959f5fbaf195d48 100644 |
--- a/chrome/browser/ui/toolbar/wrench_menu_model_unittest.cc |
+++ b/chrome/browser/ui/toolbar/wrench_menu_model_unittest.cc |
@@ -1,6 +1,7 @@ |
// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include <stdio.h> |
Peter Kasting
2015/03/30 19:37:02
Why add this?
edwardjung
2015/03/31 11:44:06
Removed, debug.
|
#include "chrome/browser/ui/toolbar/wrench_menu_model.h" |
@@ -132,8 +133,13 @@ TEST_F(WrenchMenuModelTest, Basics) { |
model.ActivatedAt(1); |
EXPECT_TRUE(model.IsEnabledAt(1)); |
// Make sure to use the index that is not separator in all configurations. |
Peter Kasting
2015/03/30 19:37:02
Is there an index that is a non-separator in all p
edwardjung
2015/03/31 11:44:05
Let me find something that works for all. i tried
|
+#if defined(OS_MACOSX) or defined(CHROMEOS) |
Peter Kasting
2015/03/30 19:37:02
"or" needs to be ||, this won't work as you have i
edwardjung
2015/03/31 11:44:05
Done.
|
model.ActivatedAt(2); |
EXPECT_TRUE(model.IsEnabledAt(2)); |
+#else |
+ model.ActivatedAt(3); |
+ EXPECT_TRUE(model.IsEnabledAt(3)); |
+#endif |
EXPECT_EQ(model.execute_count_, 2); |
EXPECT_EQ(model.enable_count_, 2); |
@@ -145,7 +151,8 @@ TEST_F(WrenchMenuModelTest, Basics) { |
int bookmarksModelIndex = -1; |
for (int i = 0; i < itemCount; ++i) { |
if (model.GetTypeAt(i) == ui::MenuModel::TYPE_SUBMENU) { |
- bookmarksModelIndex = i; |
+ // Bookmarks is now under the tabs submenu item. |
Peter Kasting
2015/03/30 19:37:02
What does "now" mean? This seems to be implicitly
edwardjung
2015/03/31 11:44:05
Done.
|
+ bookmarksModelIndex = i + 1; |
break; |
} |
} |
@@ -155,8 +162,10 @@ TEST_F(WrenchMenuModelTest, Basics) { |
// The bookmarks model may be empty until we tell it we're going to show it. |
bookmarksModel->MenuWillShow(); |
EXPECT_GT(bookmarksModel->GetItemCount(), 1); |
- bookmarksModel->ActivatedAt(1); |
- EXPECT_TRUE(bookmarksModel->IsEnabledAt(1)); |
+ |
+ // Bookmark manager item. |
+ bookmarksModel->ActivatedAt(4); |
+ EXPECT_TRUE(bookmarksModel->IsEnabledAt(4)); |
EXPECT_EQ(model.execute_count_, 1); |
EXPECT_EQ(model.enable_count_, 1); |
} |