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

Unified Diff: net/base/sdch_manager_unittest.cc

Issue 1291673003: SdchManager: remove EnableSdchSupport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Delete obsolete test Created 5 years, 4 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
Index: net/base/sdch_manager_unittest.cc
diff --git a/net/base/sdch_manager_unittest.cc b/net/base/sdch_manager_unittest.cc
index 71362f77925137d7bd609d38885e5adbb1d2a95a..0dfcb54029f29a0139696c7a5a72664b4d67cf0c 100644
--- a/net/base/sdch_manager_unittest.cc
+++ b/net/base/sdch_manager_unittest.cc
@@ -100,18 +100,12 @@ class MockSdchObserver : public SdchObserver {
class SdchManagerTest : public testing::Test {
protected:
SdchManagerTest()
- : sdch_manager_(new SdchManager),
- default_support_(sdch_manager_->sdch_enabled()) { }
+ : sdch_manager_(new SdchManager) {}
~SdchManagerTest() override {}
SdchManager* sdch_manager() { return sdch_manager_.get(); }
- // Reset globals back to default state.
- void TearDown() override {
- SdchManager::EnableSdchSupport(default_support_);
- }
-
// Attempt to add a dictionary to the manager and probe for success or
// failure.
bool AddSdchDictionary(const std::string& dictionary_text,
@@ -122,7 +116,6 @@ class SdchManagerTest : public testing::Test {
private:
scoped_ptr<SdchManager> sdch_manager_;
- bool default_support_;
};
static std::string NewSdchDictionary(const std::string& domain) {
@@ -140,9 +133,6 @@ static std::string NewSdchDictionary(const std::string& domain) {
TEST_F(SdchManagerTest, DomainSupported) {
GURL google_url("http://www.google.com");
- SdchManager::EnableSdchSupport(false);
- EXPECT_EQ(SDCH_DISABLED, sdch_manager()->IsInSupportedDomain(google_url));
- SdchManager::EnableSdchSupport(true);
EXPECT_EQ(SDCH_OK, sdch_manager()->IsInSupportedDomain(google_url));
}
@@ -591,15 +581,6 @@ 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));
-}
-
// Confirm dispatch of notification.
TEST_F(SdchManagerTest, SdchDictionaryUsed) {
MockSdchObserver observer;

Powered by Google App Engine
This is Rietveld 408576698