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

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

Issue 7744039: Switch ChromeTestSuite to the same convention as ContentTestSuite: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixing Created 9 years, 3 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) 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/values.h" 8 #include "base/values.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/intents/web_intents_registry.h" 10 #include "chrome/browser/intents/web_intents_registry.h"
11 #include "chrome/browser/webdata/web_data_service.h" 11 #include "chrome/browser/webdata/web_data_service.h"
12 #include "chrome/test/base/testing_browser_process_test.h"
13 #include "chrome/browser/ui/intents/intents_model.h" 12 #include "chrome/browser/ui/intents/intents_model.h"
14 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
15 #include "ui/base/models/tree_node_model.h" 14 #include "ui/base/models/tree_node_model.h"
16 15
17 class IntentsModelTest : public TestingBrowserProcessTest { 16 class IntentsModelTest : public testing::Test {
18 public: 17 public:
19 IntentsModelTest() 18 IntentsModelTest()
20 : ui_thread_(BrowserThread::UI, &message_loop_), 19 : ui_thread_(BrowserThread::UI, &message_loop_),
21 db_thread_(BrowserThread::DB) {} 20 db_thread_(BrowserThread::DB) {}
22 21
23 protected: 22 protected:
24 virtual void SetUp() { 23 virtual void SetUp() {
25 db_thread_.Start(); 24 db_thread_.Start();
26 wds_ = new WebDataService(); 25 wds_ = new WebDataService();
27 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 26 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 EXPECT_EQ(static_cast<size_t>(1), snode->Types().GetSize()); 175 EXPECT_EQ(static_cast<size_t>(1), snode->Types().GetSize());
177 string16 stype; 176 string16 stype;
178 ASSERT_TRUE(snode->Types().GetString(0, &stype)); 177 ASSERT_TRUE(snode->Types().GetString(0, &stype));
179 EXPECT_EQ(ASCIIToUTF16("text/url"), stype); 178 EXPECT_EQ(ASCIIToUTF16("text/url"), stype);
180 179
181 node = intents_model.GetTreeNode("www.digg.com"); 180 node = intents_model.GetTreeNode("www.digg.com");
182 ASSERT_NE(static_cast<IntentsTreeNode*>(NULL), node); 181 ASSERT_NE(static_cast<IntentsTreeNode*>(NULL), node);
183 EXPECT_EQ(IntentsTreeNode::TYPE_ORIGIN, node->Type()); 182 EXPECT_EQ(IntentsTreeNode::TYPE_ORIGIN, node->Type());
184 EXPECT_EQ(ASCIIToUTF16("www.digg.com"), node->GetTitle()); 183 EXPECT_EQ(ASCIIToUTF16("www.digg.com"), node->GetTitle());
185 } 184 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698