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.h" | 9 #include "chrome/browser/bookmarks/bookmark_model.h" |
10 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 10 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 // Make sure download shelf is created to test VIEW_ID_DOWNLOAD_SHELF | 53 // Make sure download shelf is created to test VIEW_ID_DOWNLOAD_SHELF |
54 browser()->window()->GetDownloadShelf()->Show(); | 54 browser()->window()->GetDownloadShelf()->Show(); |
55 | 55 |
56 // Create a bookmark to test VIEW_ID_BOOKMARK_BAR_ELEMENT | 56 // Create a bookmark to test VIEW_ID_BOOKMARK_BAR_ELEMENT |
57 BookmarkModel* bookmark_model = | 57 BookmarkModel* bookmark_model = |
58 BookmarkModelFactory::GetForProfile(browser()->profile()); | 58 BookmarkModelFactory::GetForProfile(browser()->profile()); |
59 if (bookmark_model) { | 59 if (bookmark_model) { |
60 if (!bookmark_model->loaded()) | 60 if (!bookmark_model->loaded()) |
61 test::WaitForBookmarkModelToLoad(bookmark_model); | 61 test::WaitForBookmarkModelToLoad(bookmark_model); |
62 | 62 |
63 bookmark_utils::AddIfNotBookmarked( | 63 bookmark_utils::AddIfNotBookmarked(bookmark_model, |
64 bookmark_model, GURL(content::kAboutBlankURL), | 64 bookmark_model, |
65 base::ASCIIToUTF16("about")); | 65 GURL(content::kAboutBlankURL), |
| 66 base::ASCIIToUTF16("about")); |
66 } | 67 } |
67 | 68 |
68 for (int i = VIEW_ID_TOOLBAR; i < VIEW_ID_PREDEFINED_COUNT; ++i) { | 69 for (int i = VIEW_ID_TOOLBAR; i < VIEW_ID_PREDEFINED_COUNT; ++i) { |
69 // Mac implementation does not support following ids yet. | 70 // Mac implementation does not support following ids yet. |
70 if (i == VIEW_ID_STAR_BUTTON || | 71 if (i == VIEW_ID_STAR_BUTTON || |
71 i == VIEW_ID_CONTENTS_SPLIT || | 72 i == VIEW_ID_CONTENTS_SPLIT || |
72 i == VIEW_ID_FEEDBACK_BUTTON || | 73 i == VIEW_ID_FEEDBACK_BUTTON || |
73 i == VIEW_ID_SCRIPT_BUBBLE || | 74 i == VIEW_ID_SCRIPT_BUBBLE || |
74 i == VIEW_ID_MIC_SEARCH_BUTTON || | 75 i == VIEW_ID_MIC_SEARCH_BUTTON || |
75 i == VIEW_ID_TRANSLATE_BUTTON) { | 76 i == VIEW_ID_TRANSLATE_BUTTON) { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 // VIEW_ID_TAB_LAST should always be available. | 114 // VIEW_ID_TAB_LAST should always be available. |
114 CheckViewID(VIEW_ID_TAB_LAST, true); | 115 CheckViewID(VIEW_ID_TAB_LAST, true); |
115 } | 116 } |
116 | 117 |
117 // Open the 11th tab. | 118 // Open the 11th tab. |
118 browser()->OpenURL(OpenURLParams( | 119 browser()->OpenURL(OpenURLParams( |
119 GURL(content::kAboutBlankURL), Referrer(), NEW_BACKGROUND_TAB, | 120 GURL(content::kAboutBlankURL), Referrer(), NEW_BACKGROUND_TAB, |
120 content::PAGE_TRANSITION_TYPED, false)); | 121 content::PAGE_TRANSITION_TYPED, false)); |
121 CheckViewID(VIEW_ID_TAB_LAST, true); | 122 CheckViewID(VIEW_ID_TAB_LAST, true); |
122 } | 123 } |
OLD | NEW |