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

Side by Side Diff: chrome/browser/ui/intents/web_intents_model_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
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/scoped_temp_dir.h" 6 #include "base/scoped_temp_dir.h"
7 #include "base/synchronization/waitable_event.h" 7 #include "base/synchronization/waitable_event.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/intents/web_intents_registry.h" 10 #include "chrome/browser/intents/web_intents_registry.h"
(...skipping 19 matching lines...) Expand all
30 wds_->Init(temp_dir_.path()); 30 wds_->Init(temp_dir_.path());
31 31
32 registry_.Initialize(wds_, NULL); 32 registry_.Initialize(wds_, NULL);
33 } 33 }
34 34
35 virtual void TearDown() { 35 virtual void TearDown() {
36 if (wds_.get()) 36 if (wds_.get())
37 wds_->Shutdown(); 37 wds_->Shutdown();
38 38
39 db_thread_.Stop(); 39 db_thread_.Stop();
40 MessageLoop::current()->PostTask(FROM_HERE, new MessageLoop::QuitTask); 40 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
41 MessageLoop::current()->Run(); 41 MessageLoop::current()->Run();
42 } 42 }
43 43
44 void LoadRegistry() { 44 void LoadRegistry() {
45 { 45 {
46 webkit_glue::WebIntentServiceData service; 46 webkit_glue::WebIntentServiceData service;
47 service.service_url = GURL("http://www.google.com/share"); 47 service.service_url = GURL("http://www.google.com/share");
48 service.action = ASCIIToUTF16("SHARE"); 48 service.action = ASCIIToUTF16("SHARE");
49 service.type = ASCIIToUTF16("text/url"); 49 service.type = ASCIIToUTF16("text/url");
50 service.title = ASCIIToUTF16("Google"); 50 service.title = ASCIIToUTF16("Google");
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 202
203 WebIntentsTreeNode* node = intents_model.GetTreeNode("www.google.com"); 203 WebIntentsTreeNode* node = intents_model.GetTreeNode("www.google.com");
204 ASSERT_EQ(2, node->child_count()); 204 ASSERT_EQ(2, node->child_count());
205 node = node->GetChild(1); 205 node = node->GetChild(1);
206 ASSERT_EQ(WebIntentsTreeNode::TYPE_SERVICE, node->Type()); 206 ASSERT_EQ(WebIntentsTreeNode::TYPE_SERVICE, node->Type());
207 ASSERT_EQ(WebIntentsTreeNode::TYPE_SERVICE, node->Type()); 207 ASSERT_EQ(WebIntentsTreeNode::TYPE_SERVICE, node->Type());
208 ServiceTreeNode* snode = static_cast<ServiceTreeNode*>(node); 208 ServiceTreeNode* snode = static_cast<ServiceTreeNode*>(node);
209 EXPECT_EQ(ASCIIToUTF16("EDIT"), snode->Action()); 209 EXPECT_EQ(ASCIIToUTF16("EDIT"), snode->Action());
210 EXPECT_EQ(ASCIIToUTF16("http://www.google.com/edit"), snode->ServiceUrl()); 210 EXPECT_EQ(ASCIIToUTF16("http://www.google.com/edit"), snode->ServiceUrl());
211 } 211 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698