| 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" | |
| 6 #include "chrome/browser/profiles/profile.h" | 5 #include "chrome/browser/profiles/profile.h" |
| 7 #include "chrome/browser/ui/browser.h" | 6 #include "chrome/browser/ui/browser.h" |
| 8 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 7 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 9 #include "chrome/browser/ui/webui/password_manager_internals/password_manager_in
ternals_ui.h" | 8 #include "chrome/browser/ui/webui/password_manager_internals/password_manager_in
ternals_ui.h" |
| 10 #include "chrome/common/url_constants.h" | 9 #include "chrome/common/url_constants.h" |
| 11 #include "chrome/test/base/ui_test_utils.h" | 10 #include "chrome/test/base/ui_test_utils.h" |
| 12 #include "chrome/test/base/web_ui_browser_test.h" | 11 #include "chrome/test/base/web_ui_browser_test.h" |
| 13 #include "components/password_manager/content/browser/password_manager_internals
_service_factory.h" | 12 #include "components/password_manager/content/browser/password_manager_internals
_service_factory.h" |
| 14 #include "components/password_manager/core/browser/password_manager_internals_se
rvice.h" | 13 #include "components/password_manager/core/browser/password_manager_internals_se
rvice.h" |
| 15 #include "components/password_manager/core/common/password_manager_switches.h" | |
| 16 #include "content/public/browser/web_contents.h" | 14 #include "content/public/browser/web_contents.h" |
| 17 | 15 |
| 18 class PasswordManagerInternalsWebUIBrowserTest : public WebUIBrowserTest { | 16 class PasswordManagerInternalsWebUIBrowserTest : public WebUIBrowserTest { |
| 19 public: | 17 public: |
| 20 PasswordManagerInternalsWebUIBrowserTest(); | 18 PasswordManagerInternalsWebUIBrowserTest(); |
| 21 ~PasswordManagerInternalsWebUIBrowserTest() override; | 19 ~PasswordManagerInternalsWebUIBrowserTest() override; |
| 22 | 20 |
| 23 void SetUpOnMainThread() override; | 21 void SetUpOnMainThread() override; |
| 24 | 22 |
| 25 protected: | 23 protected: |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 Browser* incognito = CreateIncognitoBrowser(); | 169 Browser* incognito = CreateIncognitoBrowser(); |
| 172 password_manager::PasswordManagerInternalsService* service = | 170 password_manager::PasswordManagerInternalsService* service = |
| 173 password_manager::PasswordManagerInternalsServiceFactory:: | 171 password_manager::PasswordManagerInternalsServiceFactory:: |
| 174 GetForBrowserContext(incognito->profile()->GetOffTheRecordProfile()); | 172 GetForBrowserContext(incognito->profile()->GetOffTheRecordProfile()); |
| 175 EXPECT_FALSE(service); // There should be no service for Incognito. | 173 EXPECT_FALSE(service); // There should be no service for Incognito. |
| 176 OpenInternalsPageWithBrowser(incognito, CURRENT_TAB); | 174 OpenInternalsPageWithBrowser(incognito, CURRENT_TAB); |
| 177 SetWebUIInstance( | 175 SetWebUIInstance( |
| 178 incognito->tab_strip_model()->GetActiveWebContents()->GetWebUI()); | 176 incognito->tab_strip_model()->GetActiveWebContents()->GetWebUI()); |
| 179 ASSERT_TRUE(RunJavascriptTest("testIncognitoDescription")); | 177 ASSERT_TRUE(RunJavascriptTest("testIncognitoDescription")); |
| 180 } | 178 } |
| OLD | NEW |