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

Side by Side Diff: chrome/renderer/instant_restricted_id_cache_unittest.cc

Issue 684973003: Cleanup: Move InstantRestrictedIDCache from chrome/common to chrome/renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
« no previous file with comments | « chrome/renderer/instant_restricted_id_cache.h ('k') | chrome/renderer/searchbox/searchbox.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <string> 5 #include <string>
6 #include <utility> 6 #include <utility>
7 #include <vector> 7 #include <vector>
8 #include "chrome/common/instant_restricted_id_cache.h" 8
9 #include "chrome/renderer/instant_restricted_id_cache.h"
9 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
10 11
11 namespace { 12 namespace {
12 13
13 struct TestData { 14 struct TestData {
14 TestData() {} 15 TestData() {}
15 explicit TestData(const std::string& i_value) : value(i_value) {} 16 explicit TestData(const std::string& i_value) : value(i_value) {}
16 17
17 bool operator==(const TestData& rhs) const { 18 bool operator==(const TestData& rhs) const {
18 return rhs.value == value; 19 return rhs.value == value;
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 // Add the same items again. 415 // Add the same items again.
415 cache.AddItemsWithRestrictedID(input1); 416 cache.AddItemsWithRestrictedID(input1);
416 417
417 // Make sure |cache.last_add_start_| is still valid. 418 // Make sure |cache.last_add_start_| is still valid.
418 cache.GetCurrentItems(&output); 419 cache.GetCurrentItems(&output);
419 EXPECT_EQ(3u, output.size()); 420 EXPECT_EQ(3u, output.size());
420 EXPECT_EQ(3u, cache.cache_.size()); 421 EXPECT_EQ(3u, cache.cache_.size());
421 EXPECT_EQ(12, cache.last_restricted_id_); 422 EXPECT_EQ(12, cache.last_restricted_id_);
422 EXPECT_EQ(10, cache.last_add_start_->first); 423 EXPECT_EQ(10, cache.last_add_start_->first);
423 } 424 }
OLDNEW
« no previous file with comments | « chrome/renderer/instant_restricted_id_cache.h ('k') | chrome/renderer/searchbox/searchbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698