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

Side by Side Diff: webkit/appcache/appcache_service_unittest.cc

Issue 14307012: webkit: Remove use of ALLOW_THIS_IN_INITIALIZER_LIST. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « webkit/appcache/appcache_response.cc ('k') | webkit/appcache/appcache_storage_impl.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/pickle.h" 10 #include "base/pickle.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } // namespace 82 } // namespace
83 83
84 84
85 class AppCacheServiceTest : public testing::Test { 85 class AppCacheServiceTest : public testing::Test {
86 public: 86 public:
87 AppCacheServiceTest() 87 AppCacheServiceTest()
88 : kOrigin("http://hello/"), 88 : kOrigin("http://hello/"),
89 kManifestUrl(kOrigin.Resolve("manifest")), 89 kManifestUrl(kOrigin.Resolve("manifest")),
90 service_(new AppCacheService(NULL)), 90 service_(new AppCacheService(NULL)),
91 delete_result_(net::OK), delete_completion_count_(0), 91 delete_result_(net::OK), delete_completion_count_(0),
92 ALLOW_THIS_IN_INITIALIZER_LIST(deletion_callback_( 92 deletion_callback_(
93 base::Bind(&AppCacheServiceTest::OnDeleteAppCachesComplete, 93 base::Bind(&AppCacheServiceTest::OnDeleteAppCachesComplete,
94 base::Unretained(this)))) { 94 base::Unretained(this))) {
95 // Setup to use mock storage. 95 // Setup to use mock storage.
96 service_->storage_.reset(new MockAppCacheStorage(service_.get())); 96 service_->storage_.reset(new MockAppCacheStorage(service_.get()));
97 } 97 }
98 98
99 void OnDeleteAppCachesComplete(int result) { 99 void OnDeleteAppCachesComplete(int result) {
100 delete_result_ = result; 100 delete_result_ = result;
101 ++delete_completion_count_; 101 ++delete_completion_count_;
102 } 102 }
103 103
104 MockAppCacheStorage* mock_storage() { 104 MockAppCacheStorage* mock_storage() {
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 MessageLoop::current()->RunUntilIdle(); 312 MessageLoop::current()->RunUntilIdle();
313 EXPECT_EQ(0, CountPendingHelpers()); 313 EXPECT_EQ(0, CountPendingHelpers());
314 EXPECT_FALSE(IsGroupStored(kManifestUrl)); 314 EXPECT_FALSE(IsGroupStored(kManifestUrl));
315 ResetStorage(); 315 ResetStorage();
316 316
317 service_.reset(); // Clean up. 317 service_.reset(); // Clean up.
318 MessageLoop::current()->RunUntilIdle(); 318 MessageLoop::current()->RunUntilIdle();
319 } 319 }
320 320
321 } // namespace appcache 321 } // namespace appcache
OLDNEW
« no previous file with comments | « webkit/appcache/appcache_response.cc ('k') | webkit/appcache/appcache_storage_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698