OLD | NEW |
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 "chrome/browser/plugin_prefs.h" | 5 #include "chrome/browser/plugin_prefs.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
12 #include "chrome/test/base/testing_browser_process.h" | 12 #include "chrome/test/base/testing_browser_process.h" |
13 #include "chrome/test/base/testing_profile.h" | 13 #include "chrome/test/base/testing_profile.h" |
14 #include "chrome/test/base/testing_profile_manager.h" | 14 #include "chrome/test/base/testing_profile_manager.h" |
15 #include "content/public/browser/plugin_service.h" | 15 #include "content/public/browser/plugin_service.h" |
16 #include "content/test/test_browser_thread.h" | 16 #include "content/public/test/test_browser_thread.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 #include "webkit/plugins/npapi/mock_plugin_list.cc" | 18 #include "webkit/plugins/npapi/mock_plugin_list.cc" |
19 #include "webkit/plugins/webplugininfo.h" | 19 #include "webkit/plugins/webplugininfo.h" |
20 | 20 |
21 using content::BrowserThread; | 21 using content::BrowserThread; |
22 using content::PluginService; | 22 using content::PluginService; |
23 | 23 |
24 class PluginPrefsTest : public ::testing::Test { | 24 class PluginPrefsTest : public ::testing::Test { |
25 public: | 25 public: |
26 virtual void SetUp() OVERRIDE { | 26 virtual void SetUp() OVERRIDE { |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 TestingProfile* profile_2 = | 174 TestingProfile* profile_2 = |
175 profile_manager.CreateTestingProfile("Profile 2"); | 175 profile_manager.CreateTestingProfile("Profile 2"); |
176 PluginPrefs* plugin_prefs_2 = PluginPrefs::GetForTestingProfile(profile_2); | 176 PluginPrefs* plugin_prefs_2 = PluginPrefs::GetForTestingProfile(profile_2); |
177 ASSERT_TRUE(plugin_prefs); | 177 ASSERT_TRUE(plugin_prefs); |
178 plugin_prefs_2->SetPluginListForTesting(&plugin_list); | 178 plugin_prefs_2->SetPluginListForTesting(&plugin_list); |
179 EXPECT_FALSE(plugin_prefs_2->IsPluginEnabled(plugin)); | 179 EXPECT_FALSE(plugin_prefs_2->IsPluginEnabled(plugin)); |
180 | 180 |
181 profile_manager.DeleteTestingProfile("Profile 1"); | 181 profile_manager.DeleteTestingProfile("Profile 1"); |
182 profile_manager.DeleteTestingProfile("Profile 2"); | 182 profile_manager.DeleteTestingProfile("Profile 2"); |
183 } | 183 } |
OLD | NEW |