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

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

Issue 2345233002: Enable runtime features with status=test before WebKit (Closed)
Patch Set: Created 4 years, 3 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/layout_test_content_renderer_client.cc
diff --git a/content/shell/renderer/layout_test/layout_test_content_renderer_client.cc b/content/shell/renderer/layout_test/layout_test_content_renderer_client.cc
index 3e2cb1ad0bea753cbde6a57b6e5c090259fb9262..ca33cc922d21840d7cbb17fe44cc5f4f4f7778a6 100644
--- a/content/shell/renderer/layout_test/layout_test_content_renderer_client.cc
+++ b/content/shell/renderer/layout_test/layout_test_content_renderer_client.cc
@@ -18,6 +18,7 @@
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_view.h"
#include "content/public/test/layouttest_support.h"
+#include "content/shell/common/layout_test/layout_test_switches.h"
#include "content/shell/common/shell_switches.h"
#include "content/shell/renderer/layout_test/blink_test_helpers.h"
#include "content/shell/renderer/layout_test/blink_test_runner.h"
@@ -31,6 +32,7 @@
#include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClient.h"
#include "third_party/WebKit/public/web/WebFrameWidget.h"
#include "third_party/WebKit/public/web/WebPluginParams.h"
+#include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
#include "third_party/WebKit/public/web/WebTestingSupport.h"
#include "third_party/WebKit/public/web/WebView.h"
#include "ui/gfx/icc_profile.h"
@@ -247,4 +249,11 @@ void LayoutTestContentRendererClient::DidInitializeWorkerContextOnWorkerThread(
blink::WebTestingSupport::injectInternalsObject(context);
}
+void LayoutTestContentRendererClient::SetRuntimeFeatures() {
+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kStableReleaseMode)) {
+ blink::WebRuntimeFeatures::enableTestOnlyFeatures(true);
+ }
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698