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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/shell_render_process_observer.h" 5 #include "content/shell/shell_render_process_observer.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "content/public/renderer/render_thread.h" 8 #include "content/public/renderer/render_thread.h"
9 #include "content/shell/layout_test_controller_bindings.h" 9 #include "content/shell/layout_test_controller_bindings.h"
10 #include "content/shell/shell_switches.h" 10 #include "content/shell/shell_switches.h"
11 #include "webkit/glue/webkit_glue.h"
12 #include "webkit/support/gc_extension.h"
11 13
12 namespace content { 14 namespace content {
13 15
14 ShellRenderProcessObserver::ShellRenderProcessObserver() { 16 ShellRenderProcessObserver::ShellRenderProcessObserver() {
15 RenderThread::Get()->AddObserver(this); 17 RenderThread::Get()->AddObserver(this);
16 } 18 }
17 19
18 ShellRenderProcessObserver::~ShellRenderProcessObserver() { 20 ShellRenderProcessObserver::~ShellRenderProcessObserver() {
19 } 21 }
20 22
21 void ShellRenderProcessObserver::WebKitInitialized() { 23 void ShellRenderProcessObserver::WebKitInitialized() {
22 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) 24 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
23 RenderThread::Get()->RegisterExtension(new LayoutTestControllerBindings()); 25 return;
26
27 // To implement a catch-all for not yet implemented controller properties.
28 webkit_glue::SetJavaScriptFlags(" --harmony_proxies");
29 RenderThread::Get()->RegisterExtension(new LayoutTestControllerBindings());
30
31 // We always expose GC to layout tests.
32 webkit_glue::SetJavaScriptFlags(" --expose-gc");
33 RenderThread::Get()->RegisterExtension(extensions_v8::GCExtension::Get());
24 } 34 }
25 35
26 } // namespace content 36 } // namespace content
OLDNEW
« content/shell/shell_messages.h ('K') | « content/shell/shell_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698