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

Side by Side Diff: chrome/browser/ui/cocoa/view_id_util_browsertest.mm

Issue 325443002: Move about://-related constants from //content to //url (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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.h" 10 #include "chrome/browser/devtools/devtools_window.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 browser()->window()->GetDownloadShelf()->Show(); 53 browser()->window()->GetDownloadShelf()->Show();
54 54
55 // Create a bookmark to test VIEW_ID_BOOKMARK_BAR_ELEMENT 55 // Create a bookmark to test VIEW_ID_BOOKMARK_BAR_ELEMENT
56 BookmarkModel* bookmark_model = 56 BookmarkModel* bookmark_model =
57 BookmarkModelFactory::GetForProfile(browser()->profile()); 57 BookmarkModelFactory::GetForProfile(browser()->profile());
58 if (bookmark_model) { 58 if (bookmark_model) {
59 if (!bookmark_model->loaded()) 59 if (!bookmark_model->loaded())
60 test::WaitForBookmarkModelToLoad(bookmark_model); 60 test::WaitForBookmarkModelToLoad(bookmark_model);
61 61
62 bookmark_utils::AddIfNotBookmarked( 62 bookmark_utils::AddIfNotBookmarked(
63 bookmark_model, GURL(content::kAboutBlankURL), 63 bookmark_model, GURL(url::kAboutBlankURL),
64 base::ASCIIToUTF16("about")); 64 base::ASCIIToUTF16("about"));
65 } 65 }
66 66
67 for (int i = VIEW_ID_TOOLBAR; i < VIEW_ID_PREDEFINED_COUNT; ++i) { 67 for (int i = VIEW_ID_TOOLBAR; i < VIEW_ID_PREDEFINED_COUNT; ++i) {
68 // Mac implementation does not support following ids yet. 68 // Mac implementation does not support following ids yet.
69 if (i == VIEW_ID_STAR_BUTTON || 69 if (i == VIEW_ID_STAR_BUTTON ||
70 i == VIEW_ID_CONTENTS_SPLIT || 70 i == VIEW_ID_CONTENTS_SPLIT ||
71 i == VIEW_ID_FEEDBACK_BUTTON || 71 i == VIEW_ID_FEEDBACK_BUTTON ||
72 i == VIEW_ID_SCRIPT_BUBBLE || 72 i == VIEW_ID_SCRIPT_BUBBLE ||
73 i == VIEW_ID_MIC_SEARCH_BUTTON || 73 i == VIEW_ID_MIC_SEARCH_BUTTON ||
(...skipping 25 matching lines...) Expand all
99 } 99 }
100 100
101 IN_PROC_BROWSER_TEST_F(ViewIDTest, Tab) { 101 IN_PROC_BROWSER_TEST_F(ViewIDTest, Tab) {
102 CheckViewID(VIEW_ID_TAB_0, true); 102 CheckViewID(VIEW_ID_TAB_0, true);
103 CheckViewID(VIEW_ID_TAB_LAST, true); 103 CheckViewID(VIEW_ID_TAB_LAST, true);
104 104
105 // Open 9 new tabs. 105 // Open 9 new tabs.
106 for (int i = 1; i <= 9; ++i) { 106 for (int i = 1; i <= 9; ++i) {
107 CheckViewID(static_cast<ViewID>(VIEW_ID_TAB_0 + i), false); 107 CheckViewID(static_cast<ViewID>(VIEW_ID_TAB_0 + i), false);
108 browser()->OpenURL(OpenURLParams( 108 browser()->OpenURL(OpenURLParams(
109 GURL(content::kAboutBlankURL), Referrer(), NEW_BACKGROUND_TAB, 109 GURL(url::kAboutBlankURL), Referrer(), NEW_BACKGROUND_TAB,
110 content::PAGE_TRANSITION_TYPED, false)); 110 content::PAGE_TRANSITION_TYPED, false));
111 CheckViewID(static_cast<ViewID>(VIEW_ID_TAB_0 + i), true); 111 CheckViewID(static_cast<ViewID>(VIEW_ID_TAB_0 + i), true);
112 // VIEW_ID_TAB_LAST should always be available. 112 // VIEW_ID_TAB_LAST should always be available.
113 CheckViewID(VIEW_ID_TAB_LAST, true); 113 CheckViewID(VIEW_ID_TAB_LAST, true);
114 } 114 }
115 115
116 // Open the 11th tab. 116 // Open the 11th tab.
117 browser()->OpenURL(OpenURLParams( 117 browser()->OpenURL(OpenURLParams(
118 GURL(content::kAboutBlankURL), Referrer(), NEW_BACKGROUND_TAB, 118 GURL(url::kAboutBlankURL), Referrer(), NEW_BACKGROUND_TAB,
119 content::PAGE_TRANSITION_TYPED, false)); 119 content::PAGE_TRANSITION_TYPED, false));
120 CheckViewID(VIEW_ID_TAB_LAST, true); 120 CheckViewID(VIEW_ID_TAB_LAST, true);
121 } 121 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698