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

Side by Side Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_sync_promo_controller_unittest.mm

Issue 1307093004: Remove references to IsNewAvatarMenu since the flag was removed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review feedback Created 5 years, 2 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
« no previous file with comments | « chrome/browser/ui/chrome_pages.cc ('k') | chrome/browser/ui/cocoa/browser_window_controller.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_sync_promo_controller.h"
6
7 #import <Cocoa/Cocoa.h>
8
9 #include "base/basictypes.h"
10 #include "base/command_line.h"
11 #include "base/mac/scoped_nsobject.h"
12 #include "chrome/browser/extensions/extension_service.h"
13 #include "chrome/browser/extensions/test_extension_system.h"
14 #include "chrome/browser/ui/browser.h"
15 #include "chrome/browser/ui/tabs/tab_strip_model.h"
16 #include "chrome/test/base/browser_with_test_window_test.h"
17 #include "components/signin/core/common/profile_management_switches.h"
18 #include "testing/gtest/include/gtest/gtest.h"
19
20 namespace {
21
22 class BookmarkSyncPromoControllerTest : public BrowserWithTestWindowTest {
23 public:
24 void SetUp() override {
25 switches::DisableNewAvatarMenuForTesting(
26 base::CommandLine::ForCurrentProcess());
27 BrowserWithTestWindowTest::SetUp();
28 ASSERT_TRUE(profile());
29 // Adds TestExtensionSystem, since signin uses the gaia auth extension.
30 static_cast<extensions::TestExtensionSystem*>(
31 extensions::ExtensionSystem::Get(profile()))
32 ->CreateExtensionService(base::CommandLine::ForCurrentProcess(),
33 base::FilePath(), false);
34 }
35 };
36
37 TEST_F(BookmarkSyncPromoControllerTest, SignInLink) {
38 int starting_tab_count = browser()->tab_strip_model()->count();
39
40 base::scoped_nsobject<BookmarkSyncPromoController> syncPromo(
41 [[BookmarkSyncPromoController alloc] initWithBrowser:browser()]);
42
43 // Simulate clicking the "Sign in" link.
44 [syncPromo textView:nil clickedOnLink:nil atIndex:0u];
45
46 // A new tab should have been opened.
47 int tab_count = browser()->tab_strip_model()->count();
48 EXPECT_EQ(starting_tab_count + 1, tab_count);
49 }
50
51 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/chrome_pages.cc ('k') | chrome/browser/ui/cocoa/browser_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698