| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <limits.h> | 5 #include <limits.h> |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 class SdchManagerTest : public testing::Test { | 58 class SdchManagerTest : public testing::Test { |
| 59 protected: | 59 protected: |
| 60 SdchManagerTest() | 60 SdchManagerTest() |
| 61 : sdch_manager_(new SdchManager), | 61 : sdch_manager_(new SdchManager), |
| 62 default_support_(false), | 62 default_support_(false), |
| 63 default_https_support_(false) { | 63 default_https_support_(false) { |
| 64 default_support_ = sdch_manager_->sdch_enabled(); | 64 default_support_ = sdch_manager_->sdch_enabled(); |
| 65 default_https_support_ = sdch_manager_->secure_scheme_supported(); | 65 default_https_support_ = sdch_manager_->secure_scheme_supported(); |
| 66 } | 66 } |
| 67 | 67 |
| 68 virtual ~SdchManagerTest() {} | 68 ~SdchManagerTest() override {} |
| 69 | 69 |
| 70 SdchManager* sdch_manager() { return sdch_manager_.get(); } | 70 SdchManager* sdch_manager() { return sdch_manager_.get(); } |
| 71 | 71 |
| 72 // Reset globals back to default state. | 72 // Reset globals back to default state. |
| 73 void TearDown() override { | 73 void TearDown() override { |
| 74 SdchManager::EnableSdchSupport(default_support_); | 74 SdchManager::EnableSdchSupport(default_support_); |
| 75 SdchManager::EnableSecureSchemeSupport(default_https_support_); | 75 SdchManager::EnableSecureSchemeSupport(default_https_support_); |
| 76 } | 76 } |
| 77 | 77 |
| 78 // Attempt to add a dictionary to the manager and probe for success or | 78 // Attempt to add a dictionary to the manager and probe for success or |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 scoped_ptr<SdchManager> sdch_manager(new SdchManager); | 673 scoped_ptr<SdchManager> sdch_manager(new SdchManager); |
| 674 | 674 |
| 675 EXPECT_EQ(SDCH_DISABLED, sdch_manager->IsInSupportedDomain(google_url)); | 675 EXPECT_EQ(SDCH_DISABLED, sdch_manager->IsInSupportedDomain(google_url)); |
| 676 SdchManager::EnableSdchSupport(true); | 676 SdchManager::EnableSdchSupport(true); |
| 677 EXPECT_EQ(SDCH_OK, sdch_manager->IsInSupportedDomain(google_url)); | 677 EXPECT_EQ(SDCH_OK, sdch_manager->IsInSupportedDomain(google_url)); |
| 678 } | 678 } |
| 679 | 679 |
| 680 #endif // !defined(OS_IOS) | 680 #endif // !defined(OS_IOS) |
| 681 | 681 |
| 682 } // namespace net | 682 } // namespace net |
| OLD | NEW |