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

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

Issue 267873004: Remove unused VIEW_ID_FIND_IN_PAGE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
« no previous file with comments | « chrome/browser/ui/cocoa/find_bar/find_bar_view.mm ('k') | chrome/browser/ui/view_ids.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/bookmarks/bookmark_test_helpers.h" 10 #include "chrome/browser/bookmarks/bookmark_test_helpers.h"
(...skipping 25 matching lines...) Expand all
36 void CheckViewID(ViewID view_id, bool should_have) { 36 void CheckViewID(ViewID view_id, bool should_have) {
37 if (!root_window_) 37 if (!root_window_)
38 root_window_ = browser()->window()->GetNativeWindow(); 38 root_window_ = browser()->window()->GetNativeWindow();
39 39
40 ASSERT_TRUE(root_window_); 40 ASSERT_TRUE(root_window_);
41 NSView* view = view_id_util::GetView(root_window_, view_id); 41 NSView* view = view_id_util::GetView(root_window_, view_id);
42 EXPECT_EQ(should_have, !!view) << " Failed id=" << view_id; 42 EXPECT_EQ(should_have, !!view) << " Failed id=" << view_id;
43 } 43 }
44 44
45 void DoTest() { 45 void DoTest() {
46 // Make sure FindBar is created to test 46 // Make sure FindBar is created to test VIEW_ID_FIND_IN_PAGE_TEXT_FIELD.
47 // VIEW_ID_FIND_IN_PAGE_TEXT_FIELD and VIEW_ID_FIND_IN_PAGE.
48 chrome::ShowFindBar(browser()); 47 chrome::ShowFindBar(browser());
49 48
50 // Make sure docked devtools is created to test VIEW_ID_DEV_TOOLS_DOCKED 49 // Make sure docked devtools is created to test VIEW_ID_DEV_TOOLS_DOCKED
51 DevToolsWindow::OpenDevToolsWindowForTest(browser(), true); 50 DevToolsWindow::OpenDevToolsWindowForTest(browser(), true);
52 51
53 // Make sure download shelf is created to test VIEW_ID_DOWNLOAD_SHELF 52 // Make sure download shelf is created to test VIEW_ID_DOWNLOAD_SHELF
54 browser()->window()->GetDownloadShelf()->Show(); 53 browser()->window()->GetDownloadShelf()->Show();
55 54
56 // Create a bookmark to test VIEW_ID_BOOKMARK_BAR_ELEMENT 55 // Create a bookmark to test VIEW_ID_BOOKMARK_BAR_ELEMENT
57 BookmarkModel* bookmark_model = 56 BookmarkModel* bookmark_model =
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // VIEW_ID_TAB_LAST should always be available. 112 // VIEW_ID_TAB_LAST should always be available.
114 CheckViewID(VIEW_ID_TAB_LAST, true); 113 CheckViewID(VIEW_ID_TAB_LAST, true);
115 } 114 }
116 115
117 // Open the 11th tab. 116 // Open the 11th tab.
118 browser()->OpenURL(OpenURLParams( 117 browser()->OpenURL(OpenURLParams(
119 GURL(content::kAboutBlankURL), Referrer(), NEW_BACKGROUND_TAB, 118 GURL(content::kAboutBlankURL), Referrer(), NEW_BACKGROUND_TAB,
120 content::PAGE_TRANSITION_TYPED, false)); 119 content::PAGE_TRANSITION_TYPED, false));
121 CheckViewID(VIEW_ID_TAB_LAST, true); 120 CheckViewID(VIEW_ID_TAB_LAST, true);
122 } 121 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/find_bar/find_bar_view.mm ('k') | chrome/browser/ui/view_ids.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698