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 "webkit/plugins/npapi/plugin_lib.h" | 5 #include "webkit/plugins/npapi/plugin_lib.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 namespace webkit { | 12 namespace webkit { |
13 namespace npapi { | 13 namespace npapi { |
14 | 14 |
15 // Test the unloading of plugin libs. Bug http://crbug.com/46526 showed that | 15 // Test the unloading of plugin libs. Bug http://crbug.com/46526 showed that |
16 // if UnloadAllPlugins() simply iterates through the g_loaded_libs global | 16 // if UnloadAllPlugins() simply iterates through the g_loaded_libs global |
17 // variable, we can get a crash if no plugin libs were marked as always loaded. | 17 // variable, we can get a crash if no plugin libs were marked as always loaded. |
18 class PluginLibTest : public PluginLib { | 18 class PluginLibTest : public PluginLib { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 PluginLibTest::CreatePluginLib(base::FilePath())); | 57 PluginLibTest::CreatePluginLib(base::FilePath())); |
58 | 58 |
59 // Now try to manually Unload the only one and then UnloadAll. | 59 // Now try to manually Unload the only one and then UnloadAll. |
60 plugin_lib1 = new PluginLibTest(); | 60 plugin_lib1 = new PluginLibTest(); |
61 plugin_lib1->Unload(); | 61 plugin_lib1->Unload(); |
62 PluginLib::UnloadAllPlugins(); | 62 PluginLib::UnloadAllPlugins(); |
63 } | 63 } |
64 | 64 |
65 } // namespace npapi | 65 } // namespace npapi |
66 } // namespace webkit | 66 } // namespace webkit |
OLD | NEW |