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

Side by Side Diff: components/precache/core/precache_fetcher_unittest.cc

Issue 666133002: Standardize usage of virtual/override/final in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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 "components/precache/core/precache_fetcher.h" 5 #include "components/precache/core/precache_fetcher.h"
6 6
7 #include <list> 7 #include <list>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 private: 54 private:
55 // Multiset with one entry for each URL requested. 55 // Multiset with one entry for each URL requested.
56 std::multiset<GURL> requested_urls_; 56 std::multiset<GURL> requested_urls_;
57 }; 57 };
58 58
59 class TestPrecacheDelegate : public PrecacheFetcher::PrecacheDelegate { 59 class TestPrecacheDelegate : public PrecacheFetcher::PrecacheDelegate {
60 public: 60 public:
61 TestPrecacheDelegate() : was_on_done_called_(false) {} 61 TestPrecacheDelegate() : was_on_done_called_(false) {}
62 62
63 virtual void OnDone() override { 63 void OnDone() override { was_on_done_called_ = true; }
64 was_on_done_called_ = true;
65 }
66 64
67 bool was_on_done_called() const { 65 bool was_on_done_called() const {
68 return was_on_done_called_; 66 return was_on_done_called_;
69 } 67 }
70 68
71 private: 69 private:
72 bool was_on_done_called_; 70 bool was_on_done_called_;
73 }; 71 };
74 72
75 class PrecacheFetcherTest : public testing::Test { 73 class PrecacheFetcherTest : public testing::Test {
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 EXPECT_EQ(expected_requested_urls, url_callback_.requested_urls()); 299 EXPECT_EQ(expected_requested_urls, url_callback_.requested_urls());
302 300
303 EXPECT_TRUE(precache_delegate_.was_on_done_called()); 301 EXPECT_TRUE(precache_delegate_.was_on_done_called());
304 } 302 }
305 303
306 #endif // PRECACHE_MANIFEST_URL_PREFIX 304 #endif // PRECACHE_MANIFEST_URL_PREFIX
307 305
308 } // namespace 306 } // namespace
309 307
310 } // namespace precache 308 } // namespace precache
OLDNEW
« no previous file with comments | « components/precache/core/precache_fetcher.cc ('k') | components/pref_registry/pref_registry_syncable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698