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

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

Issue 13845022: Mac: Display a native bubble (instead of the JS one) after the web signin flow. (branched from http… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ntpBubble
Patch Set: Ditto Created 7 years, 7 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #import "chrome/browser/ui/cocoa/one_click_signin_dialog_controller.h" 5 #import "chrome/browser/ui/cocoa/one_click_signin_dialog_controller.h"
6 6
7 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/browser_finder.h" 8 #include "chrome/browser/ui/browser_finder.h"
9 #import "chrome/browser/ui/cocoa/one_click_signin_view_controller.h" 9 #import "chrome/browser/ui/cocoa/one_click_signin_view_controller.h"
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" 10 #include "chrome/browser/ui/tabs/tab_strip_model.h"
11 #include "chrome/test/base/in_process_browser_test.h" 11 #include "chrome/test/base/in_process_browser_test.h"
12 #import "testing/gtest_mac.h" 12 #import "testing/gtest_mac.h"
13 13
14 class OneClickSigninDialogControllerTest : public InProcessBrowserTest { 14 class OneClickSigninDialogControllerTest : public InProcessBrowserTest {
15 public: 15 public:
16 OneClickSigninDialogControllerTest() 16 OneClickSigninDialogControllerTest()
17 : InProcessBrowserTest(), 17 : controller_(NULL),
18 controller_(NULL),
19 sync_mode_(OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS), 18 sync_mode_(OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS),
20 callback_count_(0) { 19 callback_count_(0) {
21 } 20 }
22 21
23 protected: 22 protected:
24 virtual void SetUpOnMainThread() OVERRIDE { 23 virtual void SetUpOnMainThread() OVERRIDE {
25 content::WebContents* web_contents = 24 content::WebContents* web_contents =
26 browser()->tab_strip_model()->GetWebContentsAt(0); 25 browser()->tab_strip_model()->GetWebContentsAt(0);
27 BrowserWindow::StartSyncCallback callback = base::Bind( 26 BrowserWindow::StartSyncCallback callback = base::Bind(
28 &OneClickSigninDialogControllerTest::OnStartSyncCallback, 27 &OneClickSigninDialogControllerTest::OnStartSyncCallback,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 } 78 }
80 79
81 // Test that clicking the learn more link opens a new window. 80 // Test that clicking the learn more link opens a new window.
82 IN_PROC_BROWSER_TEST_F(OneClickSigninDialogControllerTest, LearnMore) { 81 IN_PROC_BROWSER_TEST_F(OneClickSigninDialogControllerTest, LearnMore) {
83 EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); 82 EXPECT_EQ(1u, chrome::GetTotalBrowserCount());
84 [controller_->view_controller() textView:nil 83 [controller_->view_controller() textView:nil
85 clickedOnLink:nil 84 clickedOnLink:nil
86 atIndex:0]; 85 atIndex:0];
87 EXPECT_EQ(2u, chrome::GetTotalBrowserCount()); 86 EXPECT_EQ(2u, chrome::GetTotalBrowserCount());
88 } 87 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698