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

Side by Side Diff: chrome/browser/autocomplete/history_contents_provider_unittest.cc

Issue 8873032: Removing MessageLoop::QuitTask() from chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert 3 more problematic files Created 9 years 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 | « no previous file | chrome/browser/autofill/personal_data_manager_unittest.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/autocomplete/autocomplete.h" 9 #include "chrome/browser/autocomplete/autocomplete.h"
10 #include "chrome/browser/autocomplete/autocomplete_match.h" 10 #include "chrome/browser/autocomplete/autocomplete_match.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 virtual void TearDown() { 92 virtual void TearDown() {
93 provider_ = NULL; 93 provider_ = NULL;
94 profile_.reset(NULL); 94 profile_.reset(NULL);
95 } 95 }
96 96
97 // ACProviderListener 97 // ACProviderListener
98 virtual void OnProviderUpdate(bool updated_matches) { 98 virtual void OnProviderUpdate(bool updated_matches) {
99 // We must quit the message loop (if running) to return control to the test. 99 // We must quit the message loop (if running) to return control to the test.
100 // Note, calling Quit() directly will checkfail if the loop isn't running, 100 // Note, calling Quit() directly will checkfail if the loop isn't running,
101 // so we post a task, which is safe for either case. 101 // so we post a task, which is safe for either case.
102 MessageLoop::current()->PostTask(FROM_HERE, new MessageLoop::QuitTask()); 102 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
103 } 103 }
104 104
105 MessageLoopForUI message_loop_; 105 MessageLoopForUI message_loop_;
106 content::TestBrowserThread ui_thread_; 106 content::TestBrowserThread ui_thread_;
107 content::TestBrowserThread file_thread_; 107 content::TestBrowserThread file_thread_;
108 108
109 scoped_ptr<TestingProfile> profile_; 109 scoped_ptr<TestingProfile> profile_;
110 scoped_refptr<HistoryContentsProvider> provider_; 110 scoped_refptr<HistoryContentsProvider> provider_;
111 }; 111 };
112 112
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 true, AutocompleteInput::ALL_MATCHES); 276 true, AutocompleteInput::ALL_MATCHES);
277 RunQuery(you_input, false); 277 RunQuery(you_input, false);
278 EXPECT_EQ(0U, matches().size()); 278 EXPECT_EQ(0U, matches().size());
279 279
280 // Run a query that matches the bookmark 280 // Run a query that matches the bookmark
281 RunQuery(input, false); 281 RunQuery(input, false);
282 EXPECT_EQ(1U, matches().size()); 282 EXPECT_EQ(1U, matches().size());
283 } 283 }
284 284
285 } // namespace 285 } // namespace
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autofill/personal_data_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698