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

Unified Diff: content/shell/app/shell_main_delegate.cc

Issue 1480303002: Implement a basic PPAPI plugin for Blink layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android after https://codereview.chromium.org/1478633002 Created 5 years 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 | « content/shell/BUILD.gn ('k') | content/shell/browser/shell_plugin_service_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/app/shell_main_delegate.cc
diff --git a/content/shell/app/shell_main_delegate.cc b/content/shell/app/shell_main_delegate.cc
index bc1be228b4968f2759ca9d90a75f92fe6a96a7f5..fa6993b0b2af52730262d6fc4b413bc7de681e02 100644
--- a/content/shell/app/shell_main_delegate.cc
+++ b/content/shell/app/shell_main_delegate.cc
@@ -20,6 +20,7 @@
#include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.h"
#include "content/public/test/layouttest_support.h"
+#include "content/public/test/ppapi_test_utils.h"
#include "content/shell/app/shell_crash_reporter_client.h"
#include "content/shell/browser/layout_test/layout_test_browser_main.h"
#include "content/shell/browser/layout_test/layout_test_content_browser_client.h"
@@ -120,6 +121,9 @@ ShellMainDelegate::~ShellMainDelegate() {
bool ShellMainDelegate::BasicStartupComplete(int* exit_code) {
base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess();
+ int dummy;
+ if (!exit_code)
+ exit_code = &dummy;
#if defined(OS_WIN)
// Enable trace control and transport through event tracing for Windows.
@@ -141,8 +145,7 @@ bool ShellMainDelegate::BasicStartupComplete(int* exit_code) {
// continue and try to load the fonts in BlinkTestPlatformInitialize
// below, and then try to bring up the rest of the content module.
if (!test_runner::CheckLayoutSystemDeps()) {
- if (exit_code)
- *exit_code = 1;
+ *exit_code = 1;
return true;
}
}
@@ -150,6 +153,12 @@ bool ShellMainDelegate::BasicStartupComplete(int* exit_code) {
if (command_line.HasSwitch(switches::kRunLayoutTest)) {
EnableBrowserLayoutTestMode();
+#if defined(ENABLE_PLUGINS)
+ if (!ppapi::RegisterBlinkTestPlugin(&command_line)) {
+ *exit_code = 1;
+ return true;
+ }
+#endif
command_line.AppendSwitch(switches::kProcessPerTab);
command_line.AppendSwitch(switches::kEnableLogging);
command_line.AppendSwitch(switches::kAllowFileAccessFromFiles);
@@ -198,8 +207,7 @@ bool ShellMainDelegate::BasicStartupComplete(int* exit_code) {
#endif
if (!test_runner::BlinkTestPlatformInitialize()) {
- if (exit_code)
- *exit_code = 1;
+ *exit_code = 1;
return true;
}
}
« no previous file with comments | « content/shell/BUILD.gn ('k') | content/shell/browser/shell_plugin_service_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698