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

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

Issue 1545233002: Convert Pass()→std::move() in //net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 unified diff | Download patch
« no previous file with comments | « net/base/sdch_manager.cc ('k') | net/base/sdch_net_log_params.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/macros.h" 10 #include "base/macros.h"
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 kTestVcdiffDictionary, sizeof(kTestVcdiffDictionary) - 1); 562 kTestVcdiffDictionary, sizeof(kTestVcdiffDictionary) - 1);
563 std::string client_hash; 563 std::string client_hash;
564 std::string server_hash; 564 std::string server_hash;
565 SdchManager::GenerateHash(dictionary_text, &client_hash, &server_hash); 565 SdchManager::GenerateHash(dictionary_text, &client_hash, &server_hash);
566 GURL target_gurl("http://" + dictionary_domain); 566 GURL target_gurl("http://" + dictionary_domain);
567 AddSdchDictionary(dictionary_text, target_gurl); 567 AddSdchDictionary(dictionary_text, target_gurl);
568 568
569 // It should be visible if looked up by hash whether expired or not. 569 // It should be visible if looked up by hash whether expired or not.
570 SdchProblemCode problem_code; 570 SdchProblemCode problem_code;
571 scoped_ptr<SdchManager::DictionarySet> hash_set( 571 scoped_ptr<SdchManager::DictionarySet> hash_set(
572 sdch_manager()->GetDictionarySetByHash( 572 sdch_manager()->GetDictionarySetByHash(target_gurl, server_hash,
573 target_gurl, server_hash, &problem_code).Pass()); 573 &problem_code));
574 ASSERT_TRUE(hash_set); 574 ASSERT_TRUE(hash_set);
575 ASSERT_EQ(SDCH_OK, problem_code); 575 ASSERT_EQ(SDCH_OK, problem_code);
576 576
577 // Make sure it's not visible for advertisement, but is visible 577 // Make sure it's not visible for advertisement, but is visible
578 // if looked up by hash. 578 // if looked up by hash.
579 EXPECT_FALSE(sdch_manager()->GetDictionarySet(target_gurl)); 579 EXPECT_FALSE(sdch_manager()->GetDictionarySet(target_gurl));
580 EXPECT_TRUE(sdch_manager()->GetDictionarySetByHash( 580 EXPECT_TRUE(sdch_manager()->GetDictionarySetByHash(
581 target_gurl, server_hash, &problem_code)); 581 target_gurl, server_hash, &problem_code));
582 EXPECT_EQ(SDCH_OK, problem_code); 582 EXPECT_EQ(SDCH_OK, problem_code);
583 } 583 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 EXPECT_EQ(server_hash, observer.last_server_hash()); 626 EXPECT_EQ(server_hash, observer.last_server_hash());
627 627
628 EXPECT_EQ(SDCH_OK, sdch_manager()->RemoveSdchDictionary(server_hash)); 628 EXPECT_EQ(SDCH_OK, sdch_manager()->RemoveSdchDictionary(server_hash));
629 EXPECT_EQ(1, observer.dictionary_removed_notifications()); 629 EXPECT_EQ(1, observer.dictionary_removed_notifications());
630 EXPECT_EQ(server_hash, observer.last_server_hash()); 630 EXPECT_EQ(server_hash, observer.last_server_hash());
631 631
632 sdch_manager()->RemoveObserver(&observer); 632 sdch_manager()->RemoveObserver(&observer);
633 } 633 }
634 634
635 } // namespace net 635 } // namespace net
OLDNEW
« no previous file with comments | « net/base/sdch_manager.cc ('k') | net/base/sdch_net_log_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698