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

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

Issue 193092: Replace a bunch of hardcoded URLs with constants from url_constants.h... (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/gtk/task_manager_gtk.cc ('k') | chrome/browser/history/url_database.cc » ('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) 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/common/url_constants.h"
8 #include "chrome/test/in_process_browser_test.h" 9 #include "chrome/test/in_process_browser_test.h"
9 10
10 class ViewIDTest : public InProcessBrowserTest { 11 class ViewIDTest : public InProcessBrowserTest {
11 public: 12 public:
12 ViewIDTest() : root_window_(NULL) {} 13 ViewIDTest() : root_window_(NULL) {}
13 14
14 void CheckViewID(ViewID id, bool should_have) { 15 void CheckViewID(ViewID id, bool should_have) {
15 if (!root_window_) 16 if (!root_window_)
16 root_window_ = GTK_WIDGET(browser()->window()->GetNativeHandle()); 17 root_window_ = GTK_WIDGET(browser()->window()->GetNativeHandle());
17 18
(...skipping 10 matching lines...) Expand all
28 CheckViewID(static_cast<ViewID>(i), true); 29 CheckViewID(static_cast<ViewID>(i), true);
29 } 30 }
30 31
31 CheckViewID(VIEW_ID_PREDEFINED_COUNT, false); 32 CheckViewID(VIEW_ID_PREDEFINED_COUNT, false);
32 } 33 }
33 34
34 IN_PROC_BROWSER_TEST_F(ViewIDTest, Delegate) { 35 IN_PROC_BROWSER_TEST_F(ViewIDTest, Delegate) {
35 CheckViewID(VIEW_ID_TAB_0, true); 36 CheckViewID(VIEW_ID_TAB_0, true);
36 CheckViewID(VIEW_ID_TAB_1, false); 37 CheckViewID(VIEW_ID_TAB_1, false);
37 38
38 browser()->OpenURL(GURL("about:blank"), GURL(""), 39 browser()->OpenURL(GURL(chrome::kAboutBlankURL), GURL(),
39 NEW_BACKGROUND_TAB, PageTransition::TYPED); 40 NEW_BACKGROUND_TAB, PageTransition::TYPED);
40 41
41 CheckViewID(VIEW_ID_TAB_0, true); 42 CheckViewID(VIEW_ID_TAB_0, true);
42 CheckViewID(VIEW_ID_TAB_1, true); 43 CheckViewID(VIEW_ID_TAB_1, true);
43 } 44 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/task_manager_gtk.cc ('k') | chrome/browser/history/url_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698