| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "chrome/test/testing_profile.h" | 9 #include "chrome/test/testing_profile.h" |
| 10 #include "content/browser/browser_thread.h" | 10 #include "content/browser/browser_thread.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 BrowserThread ui_thread_; | 38 BrowserThread ui_thread_; |
| 39 BrowserThread file_thread_; | 39 BrowserThread file_thread_; |
| 40 BrowserThread io_thread_; | 40 BrowserThread io_thread_; |
| 41 scoped_ptr<TestingProfile> profile_; | 41 scoped_ptr<TestingProfile> profile_; |
| 42 | 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(PluginServiceTest); | 43 DISALLOW_COPY_AND_ASSIGN(PluginServiceTest); |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 TEST_F(PluginServiceTest, SetGetChromePluginDataDir) { | |
| 47 // Check that after setting the same plugin dir we just read it is set | |
| 48 // correctly. | |
| 49 FilePath plugin_data_dir = plugin_service_->GetChromePluginDataDir(); | |
| 50 FilePath new_plugin_data_dir(FILE_PATH_LITERAL("/a/bogus/dir")); | |
| 51 plugin_service_->SetChromePluginDataDir(new_plugin_data_dir); | |
| 52 EXPECT_EQ(new_plugin_data_dir, plugin_service_->GetChromePluginDataDir()); | |
| 53 plugin_service_->SetChromePluginDataDir(plugin_data_dir); | |
| 54 EXPECT_EQ(plugin_data_dir, plugin_service_->GetChromePluginDataDir()); | |
| 55 } | |
| 56 | |
| 57 TEST_F(PluginServiceTest, GetUILocale) { | 46 TEST_F(PluginServiceTest, GetUILocale) { |
| 58 // Check for a non-empty locale string. | 47 // Check for a non-empty locale string. |
| 59 EXPECT_NE("", plugin_service_->GetUILocale()); | 48 EXPECT_NE("", plugin_service_->GetUILocale()); |
| 60 } | 49 } |
| 61 | 50 |
| 62 } // namespace | 51 } // namespace |
| OLD | NEW |