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

Side by Side Diff: content/browser/plugin_service_unittest.cc

Issue 7800004: Move more files to content_unittests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 "content/browser/plugin_service.h" 5 #include "content/browser/plugin_service.h"
6 6
7 #include "content/browser/browser_thread.h" 7 #include "content/browser/browser_thread.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace { 10 namespace {
11 11
12 class PluginServiceTest : public testing::Test { 12 class PluginServiceTest : public testing::Test {
13 public: 13 public:
14 PluginServiceTest() 14 PluginServiceTest()
15 : message_loop_(MessageLoop::TYPE_IO), 15 : message_loop_(MessageLoop::TYPE_IO),
16 ui_thread_(BrowserThread::UI, &message_loop_), 16 ui_thread_(BrowserThread::UI, &message_loop_),
17 file_thread_(BrowserThread::FILE, &message_loop_), 17 file_thread_(BrowserThread::FILE, &message_loop_),
18 io_thread_(BrowserThread::IO, &message_loop_) {} 18 io_thread_(BrowserThread::IO, &message_loop_) {}
19 19
20 20 private:
21 virtual void SetUp() {
22 plugin_service_ = PluginService::GetInstance();
23 ASSERT_TRUE(plugin_service_);
24 }
25
26 protected:
27 MessageLoop message_loop_; 21 MessageLoop message_loop_;
28 PluginService* plugin_service_;
29
30 private:
31 BrowserThread ui_thread_; 22 BrowserThread ui_thread_;
32 BrowserThread file_thread_; 23 BrowserThread file_thread_;
33 BrowserThread io_thread_; 24 BrowserThread io_thread_;
34
35 DISALLOW_COPY_AND_ASSIGN(PluginServiceTest);
36 }; 25 };
37 26
38 TEST_F(PluginServiceTest, GetUILocale) { 27 TEST_F(PluginServiceTest, GetInstance) {
39 // Check for a non-empty locale string. 28 ASSERT_TRUE(PluginService::GetInstance());
jam 2011/08/29 22:06:56 (not related to your change) this test seems so u
Paweł Hajdan Jr. 2011/08/29 22:12:14 Done.
40 EXPECT_NE("", plugin_service_->GetUILocale());
41 } 29 }
42 30
43 } // namespace 31 } // namespace
OLDNEW
« no previous file with comments | « content/browser/mock_content_browser_client.cc ('k') | content/browser/tab_contents/tab_contents_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698