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

Side by Side Diff: components/password_manager/content/browser/credential_manager_impl_unittest.cc

Issue 2716583003: Rename Origin.unique() to opaque().
Patch Set: Mac fixes Created 3 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/password_manager/content/browser/credential_manager_impl.h" 5 #include "components/password_manager/content/browser/credential_manager_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <string> 9 #include <string>
10 #include <tuple> 10 #include <tuple>
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 EXPECT_EQ(FormFetcher::State::NOT_WAITING, 419 EXPECT_EQ(FormFetcher::State::NOT_WAITING,
420 client_->pending_manager()->form_fetcher()->GetState()); 420 client_->pending_manager()->form_fetcher()->GetState());
421 421
422 autofill::PasswordForm new_form = 422 autofill::PasswordForm new_form =
423 client_->pending_manager()->pending_credentials(); 423 client_->pending_manager()->pending_credentials();
424 EXPECT_EQ(form_.username_value, new_form.username_value); 424 EXPECT_EQ(form_.username_value, new_form.username_value);
425 EXPECT_EQ(form_.display_name, new_form.display_name); 425 EXPECT_EQ(form_.display_name, new_form.display_name);
426 EXPECT_EQ(form_.password_value, new_form.password_value); 426 EXPECT_EQ(form_.password_value, new_form.password_value);
427 EXPECT_EQ(form_.origin, new_form.origin); 427 EXPECT_EQ(form_.origin, new_form.origin);
428 EXPECT_EQ(form_.signon_realm, new_form.signon_realm); 428 EXPECT_EQ(form_.signon_realm, new_form.signon_realm);
429 EXPECT_TRUE(new_form.federation_origin.unique()); 429 EXPECT_TRUE(new_form.federation_origin.opaque());
430 EXPECT_EQ(form_.icon_url, new_form.icon_url); 430 EXPECT_EQ(form_.icon_url, new_form.icon_url);
431 EXPECT_FALSE(form_.skip_zero_click); 431 EXPECT_FALSE(form_.skip_zero_click);
432 EXPECT_EQ(autofill::PasswordForm::SCHEME_HTML, new_form.scheme); 432 EXPECT_EQ(autofill::PasswordForm::SCHEME_HTML, new_form.scheme);
433 } 433 }
434 434
435 TEST_F(CredentialManagerImplTest, CredentialManagerOnStoreFederated) { 435 TEST_F(CredentialManagerImplTest, CredentialManagerOnStoreFederated) {
436 EXPECT_CALL(*client_, PromptUserToSavePasswordPtr( 436 EXPECT_CALL(*client_, PromptUserToSavePasswordPtr(
437 _, CredentialSourceType::CREDENTIAL_SOURCE_API)) 437 _, CredentialSourceType::CREDENTIAL_SOURCE_API))
438 .Times(testing::Exactly(1)); 438 .Times(testing::Exactly(1));
439 EXPECT_CALL(*client_, NotifyStorePasswordCalled()); 439 EXPECT_CALL(*client_, NotifyStorePasswordCalled());
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1577 _, CredentialSourceType::CREDENTIAL_SOURCE_API)); 1577 _, CredentialSourceType::CREDENTIAL_SOURCE_API));
1578 CallStore(info, base::Bind(&RespondCallback, &called)); 1578 CallStore(info, base::Bind(&RespondCallback, &called));
1579 // Allow the PasswordFormManager to talk to the password store 1579 // Allow the PasswordFormManager to talk to the password store
1580 RunAllPendingTasks(); 1580 RunAllPendingTasks();
1581 1581
1582 ASSERT_TRUE(client_->pending_manager()); 1582 ASSERT_TRUE(client_->pending_manager());
1583 EXPECT_TRUE(client_->pending_manager()->IsBlacklisted()); 1583 EXPECT_TRUE(client_->pending_manager()->IsBlacklisted());
1584 } 1584 }
1585 1585
1586 } // namespace password_manager 1586 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698