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

Side by Side Diff: chrome/browser/gtk/view_id_util_browsertest.cc

Issue 192060: Put the find bar back for mac and linux. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 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/browser.cc ('k') | no next file » | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/browser/browser.h" 5 #include "chrome/browser/browser.h"
6 #include "chrome/browser/browser_window.h" 6 #include "chrome/browser/browser_window.h"
7 #include "chrome/browser/gtk/view_id_util.h" 7 #include "chrome/browser/gtk/view_id_util.h"
8 #include "chrome/test/in_process_browser_test.h" 8 #include "chrome/test/in_process_browser_test.h"
9 9
10 class ViewIDTest : public InProcessBrowserTest { 10 class ViewIDTest : public InProcessBrowserTest {
11 public: 11 public:
12 ViewIDTest() : root_window_(NULL) {} 12 ViewIDTest() : root_window_(NULL) {}
13 13
14 void CheckViewID(ViewID id, bool should_have) { 14 void CheckViewID(ViewID id, bool should_have) {
15 if (!root_window_) 15 if (!root_window_)
16 root_window_ = GTK_WIDGET(browser()->window()->GetNativeHandle()); 16 root_window_ = GTK_WIDGET(browser()->window()->GetNativeHandle());
17 17
18 ASSERT_TRUE(root_window_); 18 ASSERT_TRUE(root_window_);
19 EXPECT_EQ(should_have, !!ViewIDUtil::GetWidget(root_window_, id)); 19 EXPECT_EQ(should_have, !!ViewIDUtil::GetWidget(root_window_, id));
20 } 20 }
21 21
22 private: 22 private:
23 GtkWidget* root_window_; 23 GtkWidget* root_window_;
24 }; 24 };
25 25
26 // Disabled since it is failing on buildbots. 26 IN_PROC_BROWSER_TEST_F(ViewIDTest, Basic) {
27 // http://code.google.com/p/chromium/issues/detail?id=21443
28 IN_PROC_BROWSER_TEST_F(ViewIDTest, DISABLED_Basic) {
29 for (int i = VIEW_ID_TOOLBAR; i < VIEW_ID_PREDEFINED_COUNT; ++i) { 27 for (int i = VIEW_ID_TOOLBAR; i < VIEW_ID_PREDEFINED_COUNT; ++i) {
30 CheckViewID(static_cast<ViewID>(i), true); 28 CheckViewID(static_cast<ViewID>(i), true);
31 } 29 }
32 30
33 CheckViewID(VIEW_ID_PREDEFINED_COUNT, false); 31 CheckViewID(VIEW_ID_PREDEFINED_COUNT, false);
34 } 32 }
35 33
36 IN_PROC_BROWSER_TEST_F(ViewIDTest, Delegate) { 34 IN_PROC_BROWSER_TEST_F(ViewIDTest, Delegate) {
37 CheckViewID(VIEW_ID_TAB_0, true); 35 CheckViewID(VIEW_ID_TAB_0, true);
38 CheckViewID(VIEW_ID_TAB_1, false); 36 CheckViewID(VIEW_ID_TAB_1, false);
39 37
40 browser()->OpenURL(GURL("about:blank"), GURL(""), 38 browser()->OpenURL(GURL("about:blank"), GURL(""),
41 NEW_BACKGROUND_TAB, PageTransition::TYPED); 39 NEW_BACKGROUND_TAB, PageTransition::TYPED);
42 40
43 CheckViewID(VIEW_ID_TAB_0, true); 41 CheckViewID(VIEW_ID_TAB_0, true);
44 CheckViewID(VIEW_ID_TAB_1, true); 42 CheckViewID(VIEW_ID_TAB_1, true);
45 } 43 }
OLDNEW
« no previous file with comments | « chrome/browser/browser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698