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

Unified Diff: content/shell/shell_render_process_observer.cc

Issue 10740002: Stub out not yet implemented controller methods, so we don't have to wait for timeouts but fail imm… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing Created 8 years, 5 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 | « content/shell/shell_messages.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/shell_render_process_observer.cc
diff --git a/content/shell/shell_render_process_observer.cc b/content/shell/shell_render_process_observer.cc
index a46f6f9797631307ae9ed5d311d9bfbfc5ffe394..e78218ec8533d8449f0772df2e4ac4c6755df4d4 100644
--- a/content/shell/shell_render_process_observer.cc
+++ b/content/shell/shell_render_process_observer.cc
@@ -8,6 +8,8 @@
#include "content/public/renderer/render_thread.h"
#include "content/shell/layout_test_controller_bindings.h"
#include "content/shell/shell_switches.h"
+#include "webkit/glue/webkit_glue.h"
+#include "webkit/support/gc_extension.h"
namespace content {
@@ -19,8 +21,16 @@ ShellRenderProcessObserver::~ShellRenderProcessObserver() {
}
void ShellRenderProcessObserver::WebKitInitialized() {
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
- RenderThread::Get()->RegisterExtension(new LayoutTestControllerBindings());
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
+ return;
+
+ // To implement a catch-all for not yet implemented controller properties.
+ webkit_glue::SetJavaScriptFlags(" --harmony_proxies");
+ RenderThread::Get()->RegisterExtension(new LayoutTestControllerBindings());
+
+ // We always expose GC to layout tests.
+ webkit_glue::SetJavaScriptFlags(" --expose-gc");
+ RenderThread::Get()->RegisterExtension(extensions_v8::GCExtension::Get());
}
} // namespace content
« no previous file with comments | « content/shell/shell_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698