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

Unified Diff: chrome/browser/ui/cocoa/passwords/passwords_list_view_controller_unittest.mm

Issue 1723583004: CREDENTIAL: Convert federations from URLs to origins throughout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: iOS2 Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/passwords/passwords_list_view_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/passwords/passwords_list_view_controller_unittest.mm b/chrome/browser/ui/cocoa/passwords/passwords_list_view_controller_unittest.mm
index 0832ab9dd3bfbf3161b7b3257598a16061eb4bb9..79f3d93b0691425a12a63afcb63f6ebc0d1f61a9 100644
--- a/chrome/browser/ui/cocoa/passwords/passwords_list_view_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/passwords/passwords_list_view_controller_unittest.mm
@@ -21,6 +21,7 @@
#include "components/password_manager/core/browser/password_store.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/gtest_mac.h"
+#include "url/origin.h"
using namespace testing;
@@ -72,7 +73,8 @@ class PasswordsListViewControllerTest : public ManagePasswordsControllerTest {
autofill::PasswordForm federated_credential() {
autofill::PasswordForm form;
form.username_value = base::SysNSStringToUTF16(kItemTestUsername);
- form.federation_url = GURL(base::SysNSStringToUTF16(kFederation));
+ form.federation_origin =
+ url::Origin(GURL(base::SysNSStringToUTF16(kFederation)));
return form;
}
@@ -164,7 +166,7 @@ TEST_F(PasswordsListViewControllerTest,
[GetControllerAt(1) contentView]);
EXPECT_NSEQ(kItemTestUsername, manageView.usernameField.stringValue);
EXPECT_THAT(base::SysNSStringToUTF8(manageView.passwordField.stringValue),
- HasSubstr(federated_credential().federation_url.host()));
+ HasSubstr(federated_credential().federation_origin.host()));
}
TEST_F(PasswordsListViewControllerTest, PendingStateShouldHavePendingView) {
@@ -200,5 +202,5 @@ TEST_F(PasswordsListViewControllerTest,
// Ensure the fields are populated properly and the password is obscured.
EXPECT_NSEQ(kItemTestUsername, pendingView.usernameField.stringValue);
EXPECT_THAT(base::SysNSStringToUTF8(pendingView.passwordField.stringValue),
- HasSubstr(federated_credential().federation_url.host()));
+ HasSubstr(federated_credential().federation_origin.host()));
}

Powered by Google App Engine
This is Rietveld 408576698