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

Unified Diff: net/base/sdch_manager_unittest.cc

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 | « net/base/sdch_manager.cc ('k') | net/base/upload_file_element_reader.cc » ('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 c1a25dac1fbe6304530e7b500fde483b6c085509..40b55c671ec4bf7543092a7a5bd130d0d234a197 100644
--- a/net/base/sdch_manager_unittest.cc
+++ b/net/base/sdch_manager_unittest.cc
@@ -14,6 +14,10 @@
namespace net {
//------------------------------------------------------------------------------
+// Workaround for http://crbug.com/418975; 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.
static const char kTestVcdiffDictionary[] = "DictionaryFor"
@@ -59,7 +63,6 @@ class SdchManagerTest : public testing::Test {
bool default_https_support_;
};
-//------------------------------------------------------------------------------
static std::string NewSdchDictionary(const std::string& domain) {
std::string dictionary;
if (!domain.empty()) {
@@ -569,4 +572,17 @@ TEST_F(SdchManagerTest, ClearDictionaryData) {
EXPECT_TRUE(sdch_manager()->IsInSupportedDomain(blacklist_url));
}
+#else
+
+TEST(SdchManagerTest, SdchOffByDefault) {
+ GURL google_url("http://www.google.com");
+ SdchManager* sdch_manager(new SdchManager);
+
+ EXPECT_FALSE(sdch_manager->IsInSupportedDomain(google_url));
+ SdchManager::EnableSdchSupport(true);
+ EXPECT_TRUE(sdch_manager->IsInSupportedDomain(google_url));
+}
+
+#endif // !defined(OS_IOS)
+
} // namespace net
« no previous file with comments | « net/base/sdch_manager.cc ('k') | net/base/upload_file_element_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698