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

Side by Side Diff: chrome/browser/ui/cocoa/passwords/autosignin_prompt_view_controller_unittest.mm

Issue 1922133002: Change 'const' -> 'constexpr' in cocoa/passwords. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/passwords/account_chooser_view_controller.h" 5 #import "chrome/browser/ui/cocoa/passwords/account_chooser_view_controller.h"
6 6
7 #include "base/mac/scoped_nsobject.h" 7 #include "base/mac/scoped_nsobject.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" 9 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
10 #import "chrome/browser/ui/cocoa/passwords/autosignin_prompt_view_controller.h" 10 #import "chrome/browser/ui/cocoa/passwords/autosignin_prompt_view_controller.h"
11 #include "chrome/browser/ui/passwords/password_dialog_controller.h" 11 #include "chrome/browser/ui/passwords/password_dialog_controller.h"
12 #include "components/autofill/core/common/password_form.h" 12 #include "components/autofill/core/common/password_form.h"
13 #include "testing/gmock/include/gmock/gmock.h" 13 #include "testing/gmock/include/gmock/gmock.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 16
17 namespace { 17 namespace {
18 18
19 const char kDialogTitle[] = "Auto signin"; 19 constexpr char kDialogTitle[] = "Auto signin";
20 const char kDialogText[] = "bla bla"; 20 constexpr char kDialogText[] = "bla bla";
21 21
22 class PasswordDialogControllerMock : public PasswordDialogController { 22 class PasswordDialogControllerMock : public PasswordDialogController {
23 public: 23 public:
24 MOCK_CONST_METHOD0(GetLocalForms, const FormsVector&()); 24 MOCK_CONST_METHOD0(GetLocalForms, const FormsVector&());
25 MOCK_CONST_METHOD0(GetFederationsForms, const FormsVector&()); 25 MOCK_CONST_METHOD0(GetFederationsForms, const FormsVector&());
26 MOCK_CONST_METHOD0(GetAccoutChooserTitle, 26 MOCK_CONST_METHOD0(GetAccoutChooserTitle,
27 std::pair<base::string16, gfx::Range>()); 27 std::pair<base::string16, gfx::Range>());
28 MOCK_CONST_METHOD0(GetAutoSigninPromoTitle, base::string16()); 28 MOCK_CONST_METHOD0(GetAutoSigninPromoTitle, base::string16());
29 MOCK_CONST_METHOD0(GetAutoSigninText, 29 MOCK_CONST_METHOD0(GetAutoSigninText,
30 std::pair<base::string16, gfx::Range>()); 30 std::pair<base::string16, gfx::Range>());
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // A user may press mouse down, some navigation closes the dialog, mouse up 114 // A user may press mouse down, some navigation closes the dialog, mouse up
115 // still sends the action. The view should not crash. 115 // still sends the action. The view should not crash.
116 SetUpAutosigninFirstRun(); 116 SetUpAutosigninFirstRun();
117 [view_controller() setBridge:nil]; 117 [view_controller() setBridge:nil];
118 [view_controller().contentText clickedOnLink:@"" atIndex:0]; 118 [view_controller().contentText clickedOnLink:@"" atIndex:0];
119 [view_controller().okButton performClick:nil]; 119 [view_controller().okButton performClick:nil];
120 [view_controller().turnOffButton performClick:nil]; 120 [view_controller().turnOffButton performClick:nil];
121 } 121 }
122 122
123 } // namespace 123 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698