OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include <string> | 5 #include <string> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/metrics/histogram_samples.h" | 8 #include "base/metrics/histogram_samples.h" |
9 #include "base/metrics/statistics_recorder.h" | 9 #include "base/metrics/statistics_recorder.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
177 // Use TestPasswordStore to remove a possible race. Normally the | 177 // Use TestPasswordStore to remove a possible race. Normally the |
178 // PasswordStore does its database manipulation on the DB thread, which | 178 // PasswordStore does its database manipulation on the DB thread, which |
179 // creates a possible race during navigation. Specifically the | 179 // creates a possible race during navigation. Specifically the |
180 // PasswordManager will ignore any forms in a page if the load from the | 180 // PasswordManager will ignore any forms in a page if the load from the |
181 // PasswordStore has not completed. | 181 // PasswordStore has not completed. |
182 PasswordStoreFactory::GetInstance()->SetTestingFactory( | 182 PasswordStoreFactory::GetInstance()->SetTestingFactory( |
183 browser()->profile(), TestPasswordStoreService::Build); | 183 browser()->profile(), TestPasswordStoreService::Build); |
184 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 184 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
185 } | 185 } |
186 | 186 |
187 virtual void CleanUpOnMainThread() OVERRIDE { | 187 virtual void TearDownOnMainThread() OVERRIDE { |
188 ASSERT_TRUE(embedded_test_server()->ShutdownAndWaitUntilComplete()); | 188 ASSERT_TRUE(embedded_test_server()->ShutdownAndWaitUntilComplete()); |
189 InProcessBrowserTest::CleanUpOnMainThread(); | 189 InProcessBrowserTest::TearDownOnMainThread(); |
jam
2014/07/14 17:10:05
nit: remove
Andrew T Wilson (Slow)
2014/07/23 12:48:42
Done.
| |
190 } | 190 } |
191 | 191 |
192 protected: | 192 protected: |
193 content::WebContents* WebContents() { | 193 content::WebContents* WebContents() { |
194 return browser()->tab_strip_model()->GetActiveWebContents(); | 194 return browser()->tab_strip_model()->GetActiveWebContents(); |
195 } | 195 } |
196 | 196 |
197 content::RenderViewHost* RenderViewHost() { | 197 content::RenderViewHost* RenderViewHost() { |
198 return WebContents()->GetRenderViewHost(); | 198 return WebContents()->GetRenderViewHost(); |
199 } | 199 } |
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1078 ui_controller()->SavePassword(); | 1078 ui_controller()->SavePassword(); |
1079 } else { | 1079 } else { |
1080 EXPECT_TRUE(nav_observer.infobar_shown()); | 1080 EXPECT_TRUE(nav_observer.infobar_shown()); |
1081 } | 1081 } |
1082 // Spin the message loop to make sure the password store had a chance to save | 1082 // Spin the message loop to make sure the password store had a chance to save |
1083 // the password. | 1083 // the password. |
1084 base::RunLoop run_loop; | 1084 base::RunLoop run_loop; |
1085 run_loop.RunUntilIdle(); | 1085 run_loop.RunUntilIdle(); |
1086 EXPECT_FALSE(password_store->IsEmpty()); | 1086 EXPECT_FALSE(password_store->IsEmpty()); |
1087 } | 1087 } |
OLD | NEW |