Index: chrome/browser/apps/guest_view/web_view_browsertest.cc |
diff --git a/chrome/browser/apps/guest_view/web_view_browsertest.cc b/chrome/browser/apps/guest_view/web_view_browsertest.cc |
index 5172935d4fa07326afb530bbc0d499f0f470ecbf..b6cd4702a7c5e12cd3009161178a748d587e42d7 100644 |
--- a/chrome/browser/apps/guest_view/web_view_browsertest.cc |
+++ b/chrome/browser/apps/guest_view/web_view_browsertest.cc |
@@ -51,6 +51,7 @@ |
#if defined(ENABLE_PLUGINS) |
#include "content/public/browser/plugin_service.h" |
#include "content/public/common/webplugininfo.h" |
+#include "content/public/test/ppapi_test_utils.h" |
#endif |
#if defined(OS_CHROMEOS) |
@@ -85,15 +86,6 @@ const char kUserAgentRedirectResponsePath[] = "/detect-user-agent"; |
const char kRedirectResponseFullPath[] = |
"/extensions/platform_apps/web_view/shim/guest_redirect.html"; |
-// Platform-specific filename relative to the chrome executable. |
-#if defined(OS_WIN) |
-const wchar_t library_name[] = L"ppapi_tests.dll"; |
-#elif defined(OS_MACOSX) |
-const char library_name[] = "ppapi_tests.plugin"; |
-#elif defined(OS_POSIX) |
-const char library_name[] = "libppapi_tests.so"; |
-#endif |
- |
class EmptyHttpResponse : public net::test_server::HttpResponse { |
public: |
std::string ToResponseString() const override { return std::string(); } |
@@ -2553,22 +2545,7 @@ class WebViewPluginTest : public WebViewTest { |
protected: |
void SetUpCommandLine(base::CommandLine* command_line) override { |
WebViewTest::SetUpCommandLine(command_line); |
- |
- // Append the switch to register the pepper plugin. |
- // library name = <out dir>/<test_name>.<library_extension> |
- // MIME type = application/x-ppapi-<test_name> |
- base::FilePath plugin_lib = GetPluginPath(); |
- EXPECT_TRUE(base::PathExists(plugin_lib)); |
- base::FilePath::StringType pepper_plugin = plugin_lib.value(); |
- pepper_plugin.append(FILE_PATH_LITERAL(";application/x-ppapi-tests")); |
- command_line->AppendSwitchNative(switches::kRegisterPepperPlugins, |
- pepper_plugin); |
- } |
- |
- base::FilePath GetPluginPath() const { |
- base::FilePath plugin_dir; |
- EXPECT_TRUE(PathService::Get(base::DIR_MODULE, &plugin_dir)); |
- return plugin_dir.Append(library_name); |
+ ppapi::RegisterTestLibrary(command_line); |
} |
}; |