Chromium Code Reviews| Index: chrome/browser/ui/webui/policy_ui_browsertest.cc |
| diff --git a/chrome/browser/ui/webui/policy_ui_browsertest.cc b/chrome/browser/ui/webui/policy_ui_browsertest.cc |
| index b7ae8a166d84317a718e80f13e59083c0c474126..da3e1c40d58dbbe19e8645d718e9bbd5bb2e861b 100644 |
| --- a/chrome/browser/ui/webui/policy_ui_browsertest.cc |
| +++ b/chrome/browser/ui/webui/policy_ui_browsertest.cc |
| @@ -5,6 +5,7 @@ |
| #include <vector> |
| #include "base/callback.h" |
| +#include "base/command_line.h" |
| #include "base/files/scoped_temp_dir.h" |
| #include "base/json/json_reader.h" |
| #include "base/run_loop.h" |
| @@ -14,6 +15,7 @@ |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/ui/browser.h" |
| #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| +#include "chrome/common/chrome_switches.h" |
| #include "chrome/common/url_constants.h" |
| #include "chrome/test/base/in_process_browser_test.h" |
| #include "chrome/test/base/ui_test_utils.h" |
| @@ -93,6 +95,8 @@ class PolicyUITest : public InProcessBrowserTest { |
| PolicyUITest(); |
| ~PolicyUITest() override; |
| + void SetUpCommandLine(base::CommandLine* command_line) override; |
|
bartfab (slow)
2015/09/23 12:57:48
Nit: // InProcessBrowserTest:
fhorschig
2015/09/23 16:18:26
Done.
|
| + |
| protected: |
| // InProcessBrowserTest implementation. |
| void SetUpInProcessBrowserTestFixture() override; |
| @@ -114,6 +118,11 @@ PolicyUITest::PolicyUITest() { |
| PolicyUITest::~PolicyUITest() { |
| } |
| +void PolicyUITest::SetUpCommandLine(base::CommandLine* command_line) { |
| + InProcessBrowserTest::SetUpCommandLine(command_line); |
| + command_line->AppendSwitch(switches::kEnableMaterialDesignPolicyPage); |
| +} |
| + |
| void PolicyUITest::SetUpInProcessBrowserTestFixture() { |
| EXPECT_CALL(provider_, IsInitializationComplete(_)) |
| .WillRepeatedly(Return(true)); |
| @@ -128,7 +137,7 @@ void PolicyUITest::UpdateProviderPolicy(const policy::PolicyMap& policy) { |
| void PolicyUITest::VerifyPolicies( |
| const std::vector<std::vector<std::string> >& expected_policies) { |
| - ui_test_utils::NavigateToURL(browser(), GURL("chrome://policy")); |
| + ui_test_utils::NavigateToURL(browser(), GURL("chrome://policy-internal")); |
|
bartfab (slow)
2015/09/23 12:57:48
Since the MD page is not on by default yet, we nee
fhorschig
2015/09/23 16:18:26
Done.
|
| // Retrieve the text contents of the policy table cells for all policies. |
| const std::string javascript = |