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

Unified Diff: chrome/browser/policy/policy_browsertest.cc

Issue 10908145: Converted policy.PolicyTest.testDisableSPDY pyauto test to browser_tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
« no previous file with comments | « chrome/browser/net/net_pref_observer.cc ('k') | chrome/test/functional/policy.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « chrome/browser/net/net_pref_observer.cc ('k') | chrome/test/functional/policy.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698