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

Side by Side Diff: chrome/browser/intents/web_intents_registry_unittest.cc

Issue 8873032: Removing MessageLoop::QuitTask() from chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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/json/json_value_serializer.h" 6 #include "base/json/json_value_serializer.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/scoped_temp_dir.h" 8 #include "base/scoped_temp_dir.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/extensions/test_extension_service.h" 10 #include "chrome/browser/extensions/test_extension_service.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 registry_.Initialize(wds_, &extension_service_); 91 registry_.Initialize(wds_, &extension_service_);
92 EXPECT_CALL(extension_service_, extensions()). 92 EXPECT_CALL(extension_service_, extensions()).
93 WillRepeatedly(testing::Return(&extensions_)); 93 WillRepeatedly(testing::Return(&extensions_));
94 } 94 }
95 95
96 virtual void TearDown() { 96 virtual void TearDown() {
97 if (wds_.get()) 97 if (wds_.get())
98 wds_->Shutdown(); 98 wds_->Shutdown();
99 99
100 db_thread_.Stop(); 100 db_thread_.Stop();
101 MessageLoop::current()->PostTask(FROM_HERE, new MessageLoop::QuitTask); 101 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure);
102 MessageLoop::current()->Run(); 102 MessageLoop::current()->Run();
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 db_thread_; 107 content::TestBrowserThread db_thread_;
108 scoped_refptr<WebDataService> wds_; 108 scoped_refptr<WebDataService> wds_;
109 MockExtensionService extension_service_; 109 MockExtensionService extension_service_;
110 ExtensionSet extensions_; 110 ExtensionSet extensions_;
111 WebIntentsRegistry registry_; 111 WebIntentsRegistry registry_;
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 consumer.expected_id_ = registry_.GetIntentProviders( 319 consumer.expected_id_ = registry_.GetIntentProviders(
320 ASCIIToUTF16("http://webintents.org/share"), 320 ASCIIToUTF16("http://webintents.org/share"),
321 ASCIIToUTF16("*"), &consumer); 321 ASCIIToUTF16("*"), &consumer);
322 consumer.WaitForData(); 322 consumer.WaitForData();
323 ASSERT_EQ(4U, consumer.services_.size()); 323 ASSERT_EQ(4U, consumer.services_.size());
324 EXPECT_EQ(services[0], consumer.services_[0]); 324 EXPECT_EQ(services[0], consumer.services_[0]);
325 EXPECT_EQ(services[1], consumer.services_[1]); 325 EXPECT_EQ(services[1], consumer.services_[1]);
326 EXPECT_EQ(services[2], consumer.services_[2]); 326 EXPECT_EQ(services[2], consumer.services_[2]);
327 EXPECT_EQ(services[3], consumer.services_[3]); 327 EXPECT_EQ(services[3], consumer.services_[3]);
328 } 328 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698