OLD | NEW |
---|---|
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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 | 6 |
7 #include "chrome/browser/password_manager/chrome_password_manager_client.h" | 7 #include "chrome/browser/password_manager/chrome_password_manager_client.h" |
8 | 8 |
9 #include "chrome/common/chrome_version_info.h" | 9 #include "chrome/common/chrome_version_info.h" |
10 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 10 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
185 ChromePasswordManagerClient* client = GetClient(); | 185 ChromePasswordManagerClient* client = GetClient(); |
186 service_->RegisterReceiver(&receiver_); | 186 service_->RegisterReceiver(&receiver_); |
187 EXPECT_TRUE(client->IsLoggingActive()); | 187 EXPECT_TRUE(client->IsLoggingActive()); |
188 | 188 |
189 EXPECT_CALL(receiver_, LogSavePasswordProgress(kTestText)).Times(1); | 189 EXPECT_CALL(receiver_, LogSavePasswordProgress(kTestText)).Times(1); |
190 client->LogSavePasswordProgress(kTestText); | 190 client->LogSavePasswordProgress(kTestText); |
191 | 191 |
192 service_->UnregisterReceiver(&receiver_); | 192 service_->UnregisterReceiver(&receiver_); |
193 EXPECT_FALSE(client->IsLoggingActive()); | 193 EXPECT_FALSE(client->IsLoggingActive()); |
194 } | 194 } |
195 | |
196 TEST_F(ChromePasswordManagerClientTest, LastLoadWasTransactionalReauthPage) { | |
197 ChromePasswordManagerClient* client = GetClient(); | |
198 NavigateAndCommit( | |
199 GURL("https://accounts.google.com/login?rart=123&continue=blah")); | |
200 EXPECT_TRUE(client->LastLoadWasTransactionalReauthPage()); | |
201 | |
202 NavigateAndCommit(GURL("https://accounts.google.com/login?param=123")); | |
203 EXPECT_FALSE(client->LastLoadWasTransactionalReauthPage()); | |
204 | |
205 NavigateAndCommit(GURL("https://site.com/login?rart=678")); | |
Ilya Sherman
2014/08/12 02:17:33
What about rart with no value, e.g. "https://site.
Garrett Casto
2014/08/13 20:34:40
It works right now. I don't think that you will ge
| |
206 EXPECT_FALSE(client->LastLoadWasTransactionalReauthPage()); | |
207 } | |
OLD | NEW |