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

Side by Side Diff: chrome/browser/ui/cocoa/autofill/autofill_details_container_unittest.mm

Issue 23579009: [rAc] Move email address into billing address section. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update Mac test expectations Created 7 years, 3 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 | Annotate | Revision Log
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/autofill/autofill_details_container.h" 5 #import "chrome/browser/ui/cocoa/autofill/autofill_details_container.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/autofill/autofill_section_container.h" 9 #import "chrome/browser/ui/cocoa/autofill/autofill_section_container.h"
10 #include "chrome/browser/ui/autofill/mock_autofill_dialog_view_delegate.h" 10 #include "chrome/browser/ui/autofill/mock_autofill_dialog_view_delegate.h"
(...skipping 30 matching lines...) Expand all
41 } 41 }
42 42
43 TEST_F(AutofillDetailsContainerTest, ValidateAllSections) { 43 TEST_F(AutofillDetailsContainerTest, ValidateAllSections) {
44 using namespace autofill; 44 using namespace autofill;
45 using namespace testing; 45 using namespace testing;
46 46
47 DetailOutputMap output; 47 DetailOutputMap output;
48 ValidityData validity; 48 ValidityData validity;
49 49
50 EXPECT_CALL(delegate_, InputsAreValid(_, _, VALIDATE_FINAL)) 50 EXPECT_CALL(delegate_, InputsAreValid(_, _, VALIDATE_FINAL))
51 .Times(4) 51 .Times(3)
52 .WillOnce(Return(validity))
53 .WillOnce(Return(validity)) 52 .WillOnce(Return(validity))
54 .WillOnce(Return(validity)) 53 .WillOnce(Return(validity))
55 .WillOnce(Return(validity)); 54 .WillOnce(Return(validity));
56 55
57 EXPECT_TRUE([container_ validate]); 56 EXPECT_TRUE([container_ validate]);
58 57
59 ValidityData invalid; 58 ValidityData invalid;
60 invalid[ADDRESS_HOME_ZIP] = ASCIIToUTF16("Some error message"); 59 invalid[ADDRESS_HOME_ZIP] = ASCIIToUTF16("Some error message");
61 60
62 EXPECT_CALL(delegate_, InputsAreValid(_, _, VALIDATE_FINAL)) 61 EXPECT_CALL(delegate_, InputsAreValid(_, _, VALIDATE_FINAL))
63 .Times(4) 62 .Times(3)
64 .WillOnce(Return(validity)) 63 .WillOnce(Return(validity))
65 .WillOnce(Return(validity)) 64 .WillOnce(Return(validity))
66 .WillOnce(Return(invalid)) 65 .WillOnce(Return(invalid));
67 .WillOnce(Return(validity));
68 66
69 EXPECT_FALSE([container_ validate]); 67 EXPECT_FALSE([container_ validate]);
70 } 68 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698