OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 9 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
10 #include "chrome/browser/devtools/devtools_window_testing.h" | 10 #include "chrome/browser/devtools/devtools_window_testing.h" |
11 #include "chrome/browser/download/download_shelf.h" | 11 #include "chrome/browser/download/download_shelf.h" |
12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
14 #include "chrome/browser/ui/browser_commands.h" | 14 #include "chrome/browser/ui/browser_commands.h" |
15 #include "chrome/browser/ui/browser_window.h" | 15 #include "chrome/browser/ui/browser_window.h" |
16 #include "chrome/browser/ui/cocoa/view_id_util.h" | 16 #include "chrome/browser/ui/cocoa/view_id_util.h" |
| 17 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 18 #include "chrome/browser/ui/view_ids.h" |
17 #include "chrome/common/url_constants.h" | 19 #include "chrome/common/url_constants.h" |
18 #include "chrome/test/base/in_process_browser_test.h" | 20 #include "chrome/test/base/in_process_browser_test.h" |
19 #include "components/bookmarks/browser/bookmark_model.h" | 21 #include "components/bookmarks/browser/bookmark_model.h" |
20 #include "components/bookmarks/browser/bookmark_utils.h" | 22 #include "components/bookmarks/browser/bookmark_utils.h" |
21 #include "components/bookmarks/test/bookmark_test_helpers.h" | 23 #include "components/bookmarks/test/bookmark_test_helpers.h" |
22 #include "extensions/common/switches.h" | 24 #include "extensions/common/switches.h" |
23 | 25 |
24 using bookmarks::BookmarkModel; | 26 using bookmarks::BookmarkModel; |
25 using content::OpenURLParams; | 27 using content::OpenURLParams; |
26 using content::Referrer; | 28 using content::Referrer; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 if (!bookmark_model->loaded()) | 62 if (!bookmark_model->loaded()) |
61 bookmarks::test::WaitForBookmarkModelToLoad(bookmark_model); | 63 bookmarks::test::WaitForBookmarkModelToLoad(bookmark_model); |
62 | 64 |
63 bookmarks::AddIfNotBookmarked(bookmark_model, | 65 bookmarks::AddIfNotBookmarked(bookmark_model, |
64 GURL(url::kAboutBlankURL), | 66 GURL(url::kAboutBlankURL), |
65 base::ASCIIToUTF16("about")); | 67 base::ASCIIToUTF16("about")); |
66 } | 68 } |
67 | 69 |
68 for (int i = VIEW_ID_TOOLBAR; i < VIEW_ID_PREDEFINED_COUNT; ++i) { | 70 for (int i = VIEW_ID_TOOLBAR; i < VIEW_ID_PREDEFINED_COUNT; ++i) { |
69 // Mac implementation does not support following ids yet. | 71 // Mac implementation does not support following ids yet. |
70 if (i == VIEW_ID_STAR_BUTTON || | 72 if (i == VIEW_ID_STAR_BUTTON || i == VIEW_ID_BROWSER_ACTION || |
71 i == VIEW_ID_CONTENTS_SPLIT || | 73 i == VIEW_ID_SIDE_BAR_SPLIT || i == VIEW_ID_SIDE_BAR_VIEW || |
72 i == VIEW_ID_BROWSER_ACTION || | 74 i == VIEW_ID_FEEDBACK_BUTTON || i == VIEW_ID_SCRIPT_BUBBLE || |
73 i == VIEW_ID_FEEDBACK_BUTTON || | 75 i == VIEW_ID_MIC_SEARCH_BUTTON || i == VIEW_ID_TRANSLATE_BUTTON) { |
74 i == VIEW_ID_SCRIPT_BUBBLE || | |
75 i == VIEW_ID_MIC_SEARCH_BUTTON || | |
76 i == VIEW_ID_TRANSLATE_BUTTON) { | |
77 continue; | 76 continue; |
78 } | 77 } |
79 | 78 |
80 CheckViewID(static_cast<ViewID>(i), true); | 79 CheckViewID(static_cast<ViewID>(i), true); |
81 } | 80 } |
82 | 81 |
83 CheckViewID(VIEW_ID_TAB, true); | 82 CheckViewID(VIEW_ID_TAB, true); |
84 CheckViewID(VIEW_ID_TAB_STRIP, true); | 83 CheckViewID(VIEW_ID_TAB_STRIP, true); |
85 CheckViewID(VIEW_ID_PREDEFINED_COUNT, false); | 84 CheckViewID(VIEW_ID_PREDEFINED_COUNT, false); |
86 | 85 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 } | 120 } |
122 | 121 |
123 // Open the 11th tab. | 122 // Open the 11th tab. |
124 browser()->OpenURL(OpenURLParams(GURL(url::kAboutBlankURL), | 123 browser()->OpenURL(OpenURLParams(GURL(url::kAboutBlankURL), |
125 Referrer(), | 124 Referrer(), |
126 NEW_BACKGROUND_TAB, | 125 NEW_BACKGROUND_TAB, |
127 ui::PAGE_TRANSITION_TYPED, | 126 ui::PAGE_TRANSITION_TYPED, |
128 false)); | 127 false)); |
129 CheckViewID(VIEW_ID_TAB_LAST, true); | 128 CheckViewID(VIEW_ID_TAB_LAST, true); |
130 } | 129 } |
OLD | NEW |