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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_local_storage_helper_browsertest.cc

Issue 1395103003: Don't use base::MessageLoop::{Quit,QuitClosure} in chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 (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 "chrome/browser/browsing_data/browsing_data_local_storage_helper.h" 5 #include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 ASSERT_TRUE(info.origin_url.SchemeIs("http")); 93 ASSERT_TRUE(info.origin_url.SchemeIs("http"));
94 if (info.origin_url.host() == kTestHosts[i]) { 94 if (info.origin_url.host() == kTestHosts[i]) {
95 ASSERT_FALSE(test_hosts_found[i]); 95 ASSERT_FALSE(test_hosts_found[i]);
96 test_hosts_found[i] = true; 96 test_hosts_found[i] = true;
97 } 97 }
98 } 98 }
99 } 99 }
100 for (size_t i = 0; i < arraysize(kTestHosts); ++i) { 100 for (size_t i = 0; i < arraysize(kTestHosts); ++i) {
101 ASSERT_TRUE(test_hosts_found[i]) << kTestHosts[i]; 101 ASSERT_TRUE(test_hosts_found[i]) << kTestHosts[i];
102 } 102 }
103 base::MessageLoop::current()->Quit(); 103 base::MessageLoop::current()->QuitWhenIdle();
104 } 104 }
105 105
106 private: 106 private:
107 BrowsingDataLocalStorageHelper* local_storage_helper_; 107 BrowsingDataLocalStorageHelper* local_storage_helper_;
108 }; 108 };
109 109
110 IN_PROC_BROWSER_TEST_F(BrowsingDataLocalStorageHelperTest, CallbackCompletes) { 110 IN_PROC_BROWSER_TEST_F(BrowsingDataLocalStorageHelperTest, CallbackCompletes) {
111 scoped_refptr<BrowsingDataLocalStorageHelper> local_storage_helper( 111 scoped_refptr<BrowsingDataLocalStorageHelper> local_storage_helper(
112 new BrowsingDataLocalStorageHelper(browser()->profile())); 112 new BrowsingDataLocalStorageHelper(browser()->profile()));
113 CreateLocalStorageFilesForTest(); 113 CreateLocalStorageFilesForTest();
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 base::Bind(&TestCompletionCallback::callback, 179 base::Bind(&TestCompletionCallback::callback,
180 base::Unretained(&callback))); 180 base::Unretained(&callback)));
181 181
182 std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo> result = 182 std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo> result =
183 callback.result(); 183 callback.result();
184 184
185 ASSERT_EQ(1u, result.size()); 185 ASSERT_EQ(1u, result.size());
186 EXPECT_EQ(origin, result.begin()->origin_url); 186 EXPECT_EQ(origin, result.begin()->origin_url);
187 } 187 }
188 } // namespace 188 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698