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

Side by Side Diff: chrome/browser/ui/intents/web_intents_model_unittest.cc

Issue 11359217: Move scoped_temp_dir from base to base/files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/files/scoped_temp_dir.h"
6 #include "base/message_loop.h" 7 #include "base/message_loop.h"
7 #include "base/scoped_temp_dir.h"
8 #include "base/synchronization/waitable_event.h" 8 #include "base/synchronization/waitable_event.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/browser/intents/web_intents_registry.h" 11 #include "chrome/browser/intents/web_intents_registry.h"
12 #include "chrome/browser/ui/intents/web_intents_model.h" 12 #include "chrome/browser/ui/intents/web_intents_model.h"
13 #include "chrome/browser/webdata/web_data_service.h" 13 #include "chrome/browser/webdata/web_data_service.h"
14 #include "content/public/test/test_browser_thread.h" 14 #include "content/public/test/test_browser_thread.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 #include "ui/base/models/tree_node_model.h" 16 #include "ui/base/models/tree_node_model.h"
17 17
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 service.title = ASCIIToUTF16("Digg"); 70 service.title = ASCIIToUTF16("Digg");
71 registry_.RegisterIntentService(service); 71 registry_.RegisterIntentService(service);
72 } 72 }
73 } 73 }
74 74
75 MessageLoopForUI message_loop_; 75 MessageLoopForUI message_loop_;
76 content::TestBrowserThread ui_thread_; 76 content::TestBrowserThread ui_thread_;
77 content::TestBrowserThread db_thread_; 77 content::TestBrowserThread db_thread_;
78 scoped_refptr<WebDataService> wds_; 78 scoped_refptr<WebDataService> wds_;
79 WebIntentsRegistry registry_; 79 WebIntentsRegistry registry_;
80 ScopedTempDir temp_dir_; 80 base::ScopedTempDir temp_dir_;
81 }; 81 };
82 82
83 class WaitingWebIntentsObserver : public WebIntentsModel::Observer { 83 class WaitingWebIntentsObserver : public WebIntentsModel::Observer {
84 public: 84 public:
85 WaitingWebIntentsObserver() : event_(true, false), added_(0) {} 85 WaitingWebIntentsObserver() : event_(true, false), added_(0) {}
86 86
87 virtual void TreeModelBeginBatch(WebIntentsModel* model) {} 87 virtual void TreeModelBeginBatch(WebIntentsModel* model) {}
88 88
89 virtual void TreeModelEndBatch(WebIntentsModel* model) { 89 virtual void TreeModelEndBatch(WebIntentsModel* model) {
90 event_.Signal(); 90 event_.Signal();
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 WebIntentsTreeNode* node = intents_model.GetTreeNode("www.google.com"); 207 WebIntentsTreeNode* node = intents_model.GetTreeNode("www.google.com");
208 ASSERT_EQ(2, node->child_count()); 208 ASSERT_EQ(2, node->child_count());
209 node = node->GetChild(1); 209 node = node->GetChild(1);
210 ASSERT_EQ(WebIntentsTreeNode::TYPE_SERVICE, node->Type()); 210 ASSERT_EQ(WebIntentsTreeNode::TYPE_SERVICE, node->Type());
211 ASSERT_EQ(WebIntentsTreeNode::TYPE_SERVICE, node->Type()); 211 ASSERT_EQ(WebIntentsTreeNode::TYPE_SERVICE, node->Type());
212 ServiceTreeNode* snode = static_cast<ServiceTreeNode*>(node); 212 ServiceTreeNode* snode = static_cast<ServiceTreeNode*>(node);
213 EXPECT_EQ(ASCIIToUTF16("XEDIT"), snode->Action()); 213 EXPECT_EQ(ASCIIToUTF16("XEDIT"), snode->Action());
214 EXPECT_EQ(ASCIIToUTF16("http://www.google.com/xedit"), snode->ServiceUrl()); 214 EXPECT_EQ(ASCIIToUTF16("http://www.google.com/xedit"), snode->ServiceUrl());
215 } 215 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_close_browsertest.cc ('k') | chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698