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

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

Issue 99343006: Merge 237115 "Security fix for untrusted signin confirm dialog" (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1700/src/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/one_click_signin_view_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
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"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 IN_PROC_BROWSER_TEST_F(OneClickSigninDialogControllerTest, Advanced) { 67 IN_PROC_BROWSER_TEST_F(OneClickSigninDialogControllerTest, Advanced) {
68 [controller_->view_controller() onClickAdvancedLink:nil]; 68 [controller_->view_controller() onClickAdvancedLink:nil];
69 EXPECT_EQ(OneClickSigninSyncStarter::CONFIGURE_SYNC_FIRST, sync_mode_); 69 EXPECT_EQ(OneClickSigninSyncStarter::CONFIGURE_SYNC_FIRST, sync_mode_);
70 EXPECT_EQ(1, callback_count_); 70 EXPECT_EQ(1, callback_count_);
71 } 71 }
72 72
73 // Test that the dialog calls the callback if the bubble is closed. 73 // Test that the dialog calls the callback if the bubble is closed.
74 // Callback should be called to setup sync with default settings. 74 // Callback should be called to setup sync with default settings.
75 IN_PROC_BROWSER_TEST_F(OneClickSigninDialogControllerTest, Close) { 75 IN_PROC_BROWSER_TEST_F(OneClickSigninDialogControllerTest, Close) {
76 controller_->constrained_window()->CloseWebContentsModalDialog(); 76 controller_->constrained_window()->CloseWebContentsModalDialog();
77 EXPECT_EQ(OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS, sync_mode_); 77 EXPECT_EQ(OneClickSigninSyncStarter::UNDO_SYNC, sync_mode_);
78 EXPECT_EQ(1, callback_count_); 78 EXPECT_EQ(1, callback_count_);
79 } 79 }
80 80
81 // Test that clicking the learn more link opens a new window. 81 // Test that clicking the learn more link opens a new window.
82 IN_PROC_BROWSER_TEST_F(OneClickSigninDialogControllerTest, LearnMore) { 82 IN_PROC_BROWSER_TEST_F(OneClickSigninDialogControllerTest, LearnMore) {
83 EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); 83 EXPECT_EQ(1u, chrome::GetTotalBrowserCount());
84 [controller_->view_controller() textView:nil 84 [controller_->view_controller() textView:nil
85 clickedOnLink:nil 85 clickedOnLink:nil
86 atIndex:0]; 86 atIndex:0];
87 EXPECT_EQ(2u, chrome::GetTotalBrowserCount()); 87 EXPECT_EQ(2u, chrome::GetTotalBrowserCount());
88 } 88 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/one_click_signin_view_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698