| Index: chrome/browser/policy/policy_browsertest.cc
|
| diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc
|
| index 1c7abe0255a8d4205ecf965981ce3c2f41691ad4..ce3e004929069970deb6df269d4e05e7b4fe6aba 100644
|
| --- a/chrome/browser/policy/policy_browsertest.cc
|
| +++ b/chrome/browser/policy/policy_browsertest.cc
|
| @@ -62,6 +62,7 @@
|
| #include "content/test/net/url_request_mock_http_job.h"
|
| #include "googleurl/src/gurl.h"
|
| #include "net/base/net_util.h"
|
| +#include "net/http/http_stream_factory.h"
|
| #include "net/url_request/url_request.h"
|
| #include "net/url_request/url_request_filter.h"
|
| #include "policy/policy_constants.h"
|
| @@ -432,6 +433,24 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, Disable3DAPIs) {
|
| }
|
| #endif
|
|
|
| +IN_PROC_BROWSER_TEST_F(PolicyTest, DisableSpdy) {
|
| + // Verifies that SPDY can be disable by policy.
|
| + EXPECT_TRUE(net::HttpStreamFactory::spdy_enabled());
|
| + PolicyMap policies;
|
| + policies.Set(key::kDisableSpdy, POLICY_LEVEL_MANDATORY,
|
| + POLICY_SCOPE_USER, base::Value::CreateBooleanValue(true));
|
| + provider_.UpdateChromePolicy(policies);
|
| + content::RunAllPendingInMessageLoop();
|
| + EXPECT_FALSE(net::HttpStreamFactory::spdy_enabled());
|
| + // Verify that it can be force-enabled too.
|
| + browser()->profile()->GetPrefs()->SetBoolean(prefs::kDisableSpdy, true);
|
| + policies.Set(key::kDisableSpdy, POLICY_LEVEL_MANDATORY,
|
| + POLICY_SCOPE_USER, base::Value::CreateBooleanValue(false));
|
| + provider_.UpdateChromePolicy(policies);
|
| + content::RunAllPendingInMessageLoop();
|
| + EXPECT_TRUE(net::HttpStreamFactory::spdy_enabled());
|
| +}
|
| +
|
| IN_PROC_BROWSER_TEST_F(PolicyTest, DeveloperToolsDisabled) {
|
| // Verifies that access to the developer tools can be disabled.
|
|
|
|
|