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

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

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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
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/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 ASSERT_TRUE(info->origin_url.SchemeIs("http")); 95 ASSERT_TRUE(info->origin_url.SchemeIs("http"));
96 if (info->origin_url.host() == kTestHosts[i]) { 96 if (info->origin_url.host() == kTestHosts[i]) {
97 ASSERT_FALSE(test_hosts_found[i]); 97 ASSERT_FALSE(test_hosts_found[i]);
98 test_hosts_found[i] = true; 98 test_hosts_found[i] = true;
99 } 99 }
100 } 100 }
101 } 101 }
102 for (size_t i = 0; i < arraysize(kTestHosts); ++i) { 102 for (size_t i = 0; i < arraysize(kTestHosts); ++i) {
103 ASSERT_TRUE(test_hosts_found[i]) << kTestHosts[i]; 103 ASSERT_TRUE(test_hosts_found[i]) << kTestHosts[i];
104 } 104 }
105 MessageLoop::current()->Quit(); 105 base::MessageLoop::current()->Quit();
106 } 106 }
107 107
108 private: 108 private:
109 BrowsingDataLocalStorageHelper* local_storage_helper_; 109 BrowsingDataLocalStorageHelper* local_storage_helper_;
110 }; 110 };
111 111
112 IN_PROC_BROWSER_TEST_F(BrowsingDataLocalStorageHelperTest, CallbackCompletes) { 112 IN_PROC_BROWSER_TEST_F(BrowsingDataLocalStorageHelperTest, CallbackCompletes) {
113 scoped_refptr<BrowsingDataLocalStorageHelper> local_storage_helper( 113 scoped_refptr<BrowsingDataLocalStorageHelper> local_storage_helper(
114 new BrowsingDataLocalStorageHelper(browser()->profile())); 114 new BrowsingDataLocalStorageHelper(browser()->profile()));
115 CreateLocalStorageFilesForTest(); 115 CreateLocalStorageFilesForTest();
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 base::Bind(&TestCompletionCallback::callback, 182 base::Bind(&TestCompletionCallback::callback,
183 base::Unretained(&callback))); 183 base::Unretained(&callback)));
184 184
185 std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo> result = 185 std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo> result =
186 callback.result(); 186 callback.result();
187 187
188 ASSERT_EQ(1u, result.size()); 188 ASSERT_EQ(1u, result.size());
189 EXPECT_EQ(origin, result.begin()->origin_url); 189 EXPECT_EQ(origin, result.begin()->origin_url);
190 } 190 }
191 } // namespace 191 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698