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

Unified Diff: content/shell/renderer/layout_test/blink_test_runner.cc

Issue 1158063002: Add plugins::TestPluginPlaceholder class and allow its use in Blink layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pluginfix
Patch Set: Created 5 years, 7 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
Index: content/shell/renderer/layout_test/blink_test_runner.cc
diff --git a/content/shell/renderer/layout_test/blink_test_runner.cc b/content/shell/renderer/layout_test/blink_test_runner.cc
index a69c2fff5bf3290e0601b357b3ffc56f378d3a63..64ee214d417e85650ed1b9f36d41e8c549012934 100644
--- a/content/shell/renderer/layout_test/blink_test_runner.cc
+++ b/content/shell/renderer/layout_test/blink_test_runner.cc
@@ -36,6 +36,7 @@
#include "content/shell/renderer/layout_test/gc_controller.h"
#include "content/shell/renderer/layout_test/layout_test_render_process_observer.h"
#include "content/shell/renderer/layout_test/leak_detector.h"
+#include "content/shell/renderer/layout_test/test_plugin_placeholder.h"
#include "content/shell/renderer/test_runner/app_banner_client.h"
#include "content/shell/renderer/test_runner/gamepad_controller.h"
#include "content/shell/renderer/test_runner/mock_screen_orientation_client.h"
@@ -672,7 +673,7 @@ void BlinkTestRunner::DispatchBeforeInstallPromptEvent(
callback.Run(reply == blink::WebAppBannerPromptReply::Cancel);
}
- void BlinkTestRunner::ResolveBeforeInstallPromptPromise(
+void BlinkTestRunner::ResolveBeforeInstallPromptPromise(
int request_id, const std::string& platform) {
WebTestInterfaces* interfaces =
LayoutTestRenderProcessObserver::GetInstance()->test_interfaces();
@@ -680,6 +681,13 @@ void BlinkTestRunner::DispatchBeforeInstallPromptEvent(
request_id, platform);
}
+blink::WebPlugin* BlinkTestRunner::CreatePluginPlaceholder(
+ blink::WebLocalFrame* frame, const blink::WebPluginParams& params) {
+ if (params.mimeType == "application/x-plugin-placeholder-test")
+ return (new TestPluginPlaceholder(frame, params))->plugin();
+ return 0;
+}
+
// RenderViewObserver --------------------------------------------------------
void BlinkTestRunner::DidClearWindowObject(WebLocalFrame* frame) {
« no previous file with comments | « content/shell/renderer/layout_test/blink_test_runner.h ('k') | content/shell/renderer/layout_test/test_plugin_placeholder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698