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

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

Issue 10538039: Renamed BrowserWindow::GetNativeHandle() to GetNativeWindow() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update copyrights Created 8 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/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/bookmarks/bookmark_model.h" 8 #include "chrome/browser/bookmarks/bookmark_model.h"
9 #include "chrome/browser/bookmarks/bookmark_utils.h" 9 #include "chrome/browser/bookmarks/bookmark_utils.h"
10 #include "chrome/browser/download/download_shelf.h" 10 #include "chrome/browser/download/download_shelf.h"
(...skipping 15 matching lines...) Expand all
26 // Basic sanity check of ViewID use on the mac. 26 // Basic sanity check of ViewID use on the mac.
27 class ViewIDTest : public InProcessBrowserTest { 27 class ViewIDTest : public InProcessBrowserTest {
28 public: 28 public:
29 ViewIDTest() : root_window_(nil) { 29 ViewIDTest() : root_window_(nil) {
30 CommandLine::ForCurrentProcess()->AppendSwitch( 30 CommandLine::ForCurrentProcess()->AppendSwitch(
31 switches::kEnableExperimentalExtensionApis); 31 switches::kEnableExperimentalExtensionApis);
32 } 32 }
33 33
34 void CheckViewID(ViewID view_id, bool should_have) { 34 void CheckViewID(ViewID view_id, bool should_have) {
35 if (!root_window_) 35 if (!root_window_)
36 root_window_ = browser()->window()->GetNativeHandle(); 36 root_window_ = browser()->window()->GetNativeWindow();
37 37
38 ASSERT_TRUE(root_window_); 38 ASSERT_TRUE(root_window_);
39 NSView* view = view_id_util::GetView(root_window_, view_id); 39 NSView* view = view_id_util::GetView(root_window_, view_id);
40 EXPECT_EQ(should_have, !!view) << " Failed id=" << view_id; 40 EXPECT_EQ(should_have, !!view) << " Failed id=" << view_id;
41 } 41 }
42 42
43 void DoTest() { 43 void DoTest() {
44 // Make sure FindBar is created to test 44 // Make sure FindBar is created to test
45 // VIEW_ID_FIND_IN_PAGE_TEXT_FIELD and VIEW_ID_FIND_IN_PAGE. 45 // VIEW_ID_FIND_IN_PAGE_TEXT_FIELD and VIEW_ID_FIND_IN_PAGE.
46 browser()->ShowFindBar(); 46 browser()->ShowFindBar();
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // VIEW_ID_TAB_LAST should always be available. 111 // VIEW_ID_TAB_LAST should always be available.
112 CheckViewID(VIEW_ID_TAB_LAST, true); 112 CheckViewID(VIEW_ID_TAB_LAST, true);
113 } 113 }
114 114
115 // Open the 11th tab. 115 // Open the 11th tab.
116 browser()->OpenURL(OpenURLParams( 116 browser()->OpenURL(OpenURLParams(
117 GURL(chrome::kAboutBlankURL), Referrer(), NEW_BACKGROUND_TAB, 117 GURL(chrome::kAboutBlankURL), Referrer(), NEW_BACKGROUND_TAB,
118 content::PAGE_TRANSITION_TYPED, false)); 118 content::PAGE_TRANSITION_TYPED, false));
119 CheckViewID(VIEW_ID_TAB_LAST, true); 119 CheckViewID(VIEW_ID_TAB_LAST, true);
120 } 120 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_strip_controller_unittest.mm ('k') | chrome/browser/ui/find_bar/find_bar_host_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698