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

Side by Side Diff: chrome/browser/password_manager/password_store_mac_unittest.cc

Issue 2716583003: Rename Origin.unique() to opaque().
Patch Set: Mac fixes Created 3 years, 10 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/password_manager/password_store_mac.h" 5 #include "chrome/browser/password_manager/password_store_mac.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 if (expectation->password_value && 147 if (expectation->password_value &&
148 wcscmp(expectation->password_value, 148 wcscmp(expectation->password_value,
149 password_manager::kTestingFederatedLoginMarker) == 0) { 149 password_manager::kTestingFederatedLoginMarker) == 0) {
150 EXPECT_TRUE(form->password_value.empty()); 150 EXPECT_TRUE(form->password_value.empty());
151 EXPECT_EQ( 151 EXPECT_EQ(
152 url::Origin(GURL(password_manager::kTestingFederationUrlSpec)), 152 url::Origin(GURL(password_manager::kTestingFederationUrlSpec)),
153 form->federation_origin); 153 form->federation_origin);
154 } else { 154 } else {
155 EXPECT_EQ(WideToUTF16(expectation->password_value), 155 EXPECT_EQ(WideToUTF16(expectation->password_value),
156 form->password_value); 156 form->password_value);
157 EXPECT_TRUE(form->federation_origin.unique()); 157 EXPECT_TRUE(form->federation_origin.opaque());
158 } 158 }
159 } else { 159 } else {
160 EXPECT_TRUE(form->blacklisted_by_user); 160 EXPECT_TRUE(form->blacklisted_by_user);
161 } 161 }
162 EXPECT_EQ(expectation->preferred, form->preferred); 162 EXPECT_EQ(expectation->preferred, form->preferred);
163 EXPECT_DOUBLE_EQ(expectation->creation_time, 163 EXPECT_DOUBLE_EQ(expectation->creation_time,
164 form->date_created.ToDoubleT()); 164 form->date_created.ToDoubleT());
165 base::Time created = base::Time::FromDoubleT(expectation->creation_time); 165 base::Time created = base::Time::FromDoubleT(expectation->creation_time);
166 EXPECT_EQ( 166 EXPECT_EQ(
167 created + base::TimeDelta::FromDays( 167 created + base::TimeDelta::FromDays(
(...skipping 1935 matching lines...) Expand 10 before | Expand all | Expand 10 after
2103 keychain_adapter.GetAllPasswordFormPasswords(); 2103 keychain_adapter.GetAllPasswordFormPasswords();
2104 EXPECT_EQ(2u, passwords.size()); 2104 EXPECT_EQ(2u, passwords.size());
2105 2105
2106 // Delete everyhting but only the Chrome-owned item should be affected. 2106 // Delete everyhting but only the Chrome-owned item should be affected.
2107 PasswordStoreMac::CleanUpKeychain(keychain(), passwords); 2107 PasswordStoreMac::CleanUpKeychain(keychain(), passwords);
2108 passwords = keychain_adapter.GetAllPasswordFormPasswords(); 2108 passwords = keychain_adapter.GetAllPasswordFormPasswords();
2109 ASSERT_EQ(1u, passwords.size()); 2109 ASSERT_EQ(1u, passwords.size());
2110 EXPECT_EQ("http://some.domain.com/", passwords[0]->signon_realm); 2110 EXPECT_EQ("http://some.domain.com/", passwords[0]->signon_realm);
2111 EXPECT_EQ(ASCIIToUTF16("sekrit"), passwords[0]->password_value); 2111 EXPECT_EQ(ASCIIToUTF16("sekrit"), passwords[0]->password_value);
2112 } 2112 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698