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

Unified Diff: net/base/sdch_manager_unittest.cc

Issue 816543004: Update from https://crrev.com/308996 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « net/base/sdch_manager.cc ('k') | net/cert/cert_policy_enforcer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/sdch_manager_unittest.cc
diff --git a/net/base/sdch_manager_unittest.cc b/net/base/sdch_manager_unittest.cc
index 2b78394e3daa9909875656934b05547203cf37ef..516d93479d5aeb6b3fd2ece1ad9c272d2cce8658 100644
--- a/net/base/sdch_manager_unittest.cc
+++ b/net/base/sdch_manager_unittest.cc
@@ -18,6 +18,9 @@
namespace net {
+// Workaround for http://crbug.com/437794; remove when fixed.
+#if !defined(OS_IOS)
+
//------------------------------------------------------------------------------
// Provide sample data and compression results with a sample VCDIFF dictionary.
// Note an SDCH dictionary has extra meta-data before the VCDIFF dictionary.
@@ -654,4 +657,26 @@ TEST_F(SdchManagerTest, ExpirationCheckedProperly) {
EXPECT_EQ(SDCH_OK, problem_code);
}
+TEST_F(SdchManagerTest, SdchOnByDefault) {
+ GURL google_url("http://www.google.com");
+ scoped_ptr<SdchManager> sdch_manager(new SdchManager);
+
+ EXPECT_EQ(SDCH_OK, sdch_manager->IsInSupportedDomain(google_url));
+ SdchManager::EnableSdchSupport(false);
+ EXPECT_EQ(SDCH_DISABLED, sdch_manager->IsInSupportedDomain(google_url));
+}
+
+#else
+
+TEST(SdchManagerTest, SdchOffByDefault) {
+ GURL google_url("http://www.google.com");
+ scoped_ptr<SdchManager> sdch_manager(new SdchManager);
+
+ EXPECT_EQ(SDCH_DISABLED, sdch_manager->IsInSupportedDomain(google_url));
+ SdchManager::EnableSdchSupport(true);
+ EXPECT_EQ(SDCH_OK, sdch_manager->IsInSupportedDomain(google_url));
+}
+
+#endif // !defined(OS_IOS)
+
} // namespace net
« no previous file with comments | « net/base/sdch_manager.cc ('k') | net/cert/cert_policy_enforcer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698