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

Side by Side Diff: chrome/browser/ui/bookmarks/bookmark_bubble_sign_in_delegate_unittest.cc

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/bookmarks/bookmark_bubble_sign_in_delegate.h" 5 #include "chrome/browser/ui/bookmarks/bookmark_bubble_sign_in_delegate.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/extensions/test_extension_service.h" 10 #include "chrome/browser/extensions/test_extension_service.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 }; 43 };
44 44
45 BrowserWindow* CreateBrowserWindow() override { return new Window(); } 45 BrowserWindow* CreateBrowserWindow() override { return new Window(); }
46 46
47 private: 47 private:
48 DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleSignInDelegateTest); 48 DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleSignInDelegateTest);
49 }; 49 };
50 50
51 void BookmarkBubbleSignInDelegateTest::SetUp() { 51 void BookmarkBubbleSignInDelegateTest::SetUp() {
52 BrowserWithTestWindowTest::SetUp(); 52 BrowserWithTestWindowTest::SetUp();
53 CommandLine* command_line = CommandLine::ForCurrentProcess(); 53 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
54 // Force web-based signin, otherwise tests will crash because inline signin 54 // Force web-based signin, otherwise tests will crash because inline signin
55 // involves IO thread operation. 55 // involves IO thread operation.
56 // TODO(guohui): fix the test for inline signin. 56 // TODO(guohui): fix the test for inline signin.
57 command_line->AppendSwitch(switches::kEnableWebBasedSignin); 57 command_line->AppendSwitch(switches::kEnableWebBasedSignin);
58 // Adds TestExtensionSystem, since signin uses the gaia auth extension. 58 // Adds TestExtensionSystem, since signin uses the gaia auth extension.
59 static_cast<extensions::TestExtensionSystem*>( 59 static_cast<extensions::TestExtensionSystem*>(
60 extensions::ExtensionSystem::Get(profile()))->CreateExtensionService( 60 extensions::ExtensionSystem::Get(profile()))->CreateExtensionService(
61 command_line, base::FilePath(), false); 61 command_line, base::FilePath(), false);
62 } 62 }
63 63
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // visible. 140 // visible.
141 int tab_count = extra_browser->tab_strip_model()->count(); 141 int tab_count = extra_browser->tab_strip_model()->count();
142 EXPECT_EQ(starting_tab_count + 1, tab_count); 142 EXPECT_EQ(starting_tab_count + 1, tab_count);
143 EXPECT_LE(1, 143 EXPECT_LE(1,
144 static_cast<BookmarkBubbleSignInDelegateTest::Window*>( 144 static_cast<BookmarkBubbleSignInDelegateTest::Window*>(
145 extra_window.get())->show_count()); 145 extra_window.get())->show_count());
146 146
147 // Required to avoid a crash when the browser is deleted. 147 // Required to avoid a crash when the browser is deleted.
148 extra_browser->tab_strip_model()->CloseAllTabs(); 148 extra_browser->tab_strip_model()->CloseAllTabs();
149 } 149 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698