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

Unified Diff: chrome/browser/ui/webui/password_manager_internals/password_manager_internals_ui_browsertest.cc

Issue 269513003: Password manager internals page service: wiring it in (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Just rebased Created 6 years, 7 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/webui/password_manager_internals/password_manager_internals_ui_browsertest.cc
diff --git a/chrome/browser/ui/webui/password_manager_internals/password_manager_internals_ui_browsertest.cc b/chrome/browser/ui/webui/password_manager_internals/password_manager_internals_ui_browsertest.cc
index 817866ba910afc631e349e6f705e10b33045077a..4d18a5923dd9950ddb99e0d576a309ba4a49e46b 100644
--- a/chrome/browser/ui/webui/password_manager_internals/password_manager_internals_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/password_manager_internals/password_manager_internals_ui_browsertest.cc
@@ -3,12 +3,15 @@
// found in the LICENSE file.
#include "base/command_line.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/webui/password_manager_internals/password_manager_internals_ui.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/ui_test_utils.h"
#include "chrome/test/base/web_ui_browsertest.h"
+#include "components/password_manager/content/browser/password_manager_internals_service_factory.h"
+#include "components/password_manager/core/browser/password_manager_internals_service.h"
#include "components/password_manager/core/common/password_manager_switches.h"
#include "content/public/browser/web_contents.h"
@@ -84,12 +87,16 @@ IN_PROC_BROWSER_TEST_F(PasswordManagerInternalsWebUIBrowserTest,
// logs created before the second tab was opened, and also that the second tab
// waits with displaying until the internals page is ready (trying to display
// the old logs just on construction time would fail).
-// TODO(vabr): Disabled until multiple tabs with the internals page can exist
-// without crashing.
IN_PROC_BROWSER_TEST_F(PasswordManagerInternalsWebUIBrowserTest,
- DISABLED_LogSavePasswordProgress_MultipleTabsIdentical) {
- // First, open one tab with the internals page, and log something.
- controller()->LogSavePasswordProgress("<script> text for testing");
+ LogSavePasswordProgress_MultipleTabsIdentical) {
+ // First, open one tab with the internals page, and log something. This time
+ // we need to log trough the service, not the controller directly, so that the
+ // service can make sure both internals pages are synchronised.
Ilya Sherman 2014/05/13 04:32:18 Would anything go wrong if all the tests were to l
vabr (Chromium) 2014/05/13 09:27:11 Done.
+ password_manager::PasswordManagerInternalsService* service =
+ password_manager::PasswordManagerInternalsServiceFactory::
+ GetForBrowserContext(browser()->profile());
+ ASSERT_TRUE(service);
+ service->ProcessLog("<script> text for testing");
ASSERT_TRUE(RunJavascriptTest("testLogText"));
// Now open a second tab with the internals page, but do not log anything.
OpenNewTabWithTheInternalsPage();

Powered by Google App Engine
This is Rietveld 408576698