Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1046)

Unified Diff: chrome/browser/apps/guest_view/web_view_browsertest.cc

Issue 1062163004: Plugins: Move Prerender tests to PPAPI and some refactoring. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 750604c7d3c2ccdb91a89afbdeb3031f25385ba2..0bc0085c3879966d3e44994824225084aa2e0e02 100644
--- a/chrome/browser/apps/guest_view/web_view_browsertest.cc
+++ b/chrome/browser/apps/guest_view/web_view_browsertest.cc
@@ -52,6 +52,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)
@@ -86,15 +87,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(); }
@@ -2583,22 +2575,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);
+ ASSERT_TRUE(ppapi::RegisterTestPlugin(command_line));
}
};
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698