| 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 "chrome/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/browser/browser_thread.h" | |
| 10 #include "chrome/test/in_process_browser_test.h" | 9 #include "chrome/test/in_process_browser_test.h" |
| 11 #include "chrome/test/testing_profile.h" | 10 #include "chrome/test/testing_profile.h" |
| 11 #include "content/browser/browser_thread.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
| 14 #include "webkit/plugins/npapi/plugin_list.h" | 14 #include "webkit/plugins/npapi/plugin_list.h" |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 // We have to mock the Client class up in order to be able to test the | 18 // We have to mock the Client class up in order to be able to test the |
| 19 // OpenChannelToPlugin function. The only really needed function of this mockup | 19 // OpenChannelToPlugin function. The only really needed function of this mockup |
| 20 // is SetPluginInfo, which gets called in | 20 // is SetPluginInfo, which gets called in |
| 21 // PluginService::FinishOpenChannelToPlugin. | 21 // PluginService::FinishOpenChannelToPlugin. |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 webkit::npapi::WebPluginInfo plugin_info; | 98 webkit::npapi::WebPluginInfo plugin_info; |
| 99 std::string plugin_mime_type; | 99 std::string plugin_mime_type; |
| 100 plugin_service_->GetFirstAllowedPluginInfo(0, 0, GURL("http://google.com/"), | 100 plugin_service_->GetFirstAllowedPluginInfo(0, 0, GURL("http://google.com/"), |
| 101 "application/pdf", | 101 "application/pdf", |
| 102 &plugin_info, | 102 &plugin_info, |
| 103 &plugin_mime_type); | 103 &plugin_mime_type); |
| 104 EXPECT_EQ("application/pdf", plugin_mime_type); | 104 EXPECT_EQ("application/pdf", plugin_mime_type); |
| 105 } | 105 } |
| 106 | 106 |
| 107 } // namespace | 107 } // namespace |
| OLD | NEW |