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

Side by Side Diff: net/base/sdch_manager_unittest.cc

Issue 669813003: Update from chromium https://crrev.com/301725/ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
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 16 matching lines...) Expand all
27 : sdch_manager_(new SdchManager), 27 : sdch_manager_(new SdchManager),
28 default_support_(false), 28 default_support_(false),
29 default_https_support_(false) { 29 default_https_support_(false) {
30 default_support_ = sdch_manager_->sdch_enabled(); 30 default_support_ = sdch_manager_->sdch_enabled();
31 default_https_support_ = sdch_manager_->secure_scheme_supported(); 31 default_https_support_ = sdch_manager_->secure_scheme_supported();
32 } 32 }
33 33
34 SdchManager* sdch_manager() { return sdch_manager_.get(); } 34 SdchManager* sdch_manager() { return sdch_manager_.get(); }
35 35
36 // Reset globals back to default state. 36 // Reset globals back to default state.
37 virtual void TearDown() { 37 void TearDown() override {
38 SdchManager::EnableSdchSupport(default_support_); 38 SdchManager::EnableSdchSupport(default_support_);
39 SdchManager::EnableSecureSchemeSupport(default_https_support_); 39 SdchManager::EnableSecureSchemeSupport(default_https_support_);
40 } 40 }
41 41
42 // Attempt to add a dictionary to the manager and probe for success or 42 // Attempt to add a dictionary to the manager and probe for success or
43 // failure. 43 // failure.
44 bool AddSdchDictionary(const std::string& dictionary_text, 44 bool AddSdchDictionary(const std::string& dictionary_text,
45 const GURL& gurl) { 45 const GURL& gurl) {
46 std::string list; 46 std::string list;
47 sdch_manager_->GetAvailDictionaryList(gurl, &list); 47 sdch_manager_->GetAvailDictionaryList(gurl, &list);
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 dictionary = NULL; 563 dictionary = NULL;
564 sdch_manager()->GetVcdiffDictionary( 564 sdch_manager()->GetVcdiffDictionary(
565 server_hash, 565 server_hash,
566 GURL("http://" + dictionary_domain + "/random_url"), 566 GURL("http://" + dictionary_domain + "/random_url"),
567 &dictionary); 567 &dictionary);
568 EXPECT_FALSE(dictionary.get()); 568 EXPECT_FALSE(dictionary.get());
569 EXPECT_TRUE(sdch_manager()->IsInSupportedDomain(blacklist_url)); 569 EXPECT_TRUE(sdch_manager()->IsInSupportedDomain(blacklist_url));
570 } 570 }
571 571
572 } // namespace net 572 } // namespace net
OLDNEW
« no previous file with comments | « net/base/sdch_dictionary_fetcher_unittest.cc ('k') | net/base/trace_net_log_observer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698