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

Side by Side Diff: content/shell/renderer/shell_render_process_observer.cc

Issue 22799014: Add --stable-release-mode to content_shell (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed a tyop Created 7 years, 4 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
« no previous file with comments | « content/shell/common/shell_switches.cc ('k') | content/shell/shell_content_browser_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer/shell_render_process_observer.h" 5 #include "content/shell/renderer/shell_render_process_observer.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "content/public/common/content_client.h" 8 #include "content/public/common/content_client.h"
9 #include "content/public/renderer/render_thread.h" 9 #include "content/public/renderer/render_thread.h"
10 #include "content/public/renderer/render_view.h" 10 #include "content/public/renderer/render_view.h"
11 #include "content/public/test/layouttest_support.h" 11 #include "content/public/test/layouttest_support.h"
12 #include "content/shell/common/shell_messages.h" 12 #include "content/shell/common/shell_messages.h"
13 #include "content/shell/common/shell_switches.h" 13 #include "content/shell/common/shell_switches.h"
14 #include "content/shell/renderer/gc_extension.h" 14 #include "content/shell/renderer/gc_extension.h"
15 #include "content/shell/renderer/shell_content_renderer_client.h" 15 #include "content/shell/renderer/shell_content_renderer_client.h"
16 #include "content/shell/renderer/webkit_test_runner.h" 16 #include "content/shell/renderer/webkit_test_runner.h"
17 #include "third_party/WebKit/public/testing/WebTestInterfaces.h" 17 #include "third_party/WebKit/public/testing/WebTestInterfaces.h"
18 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
18 #include "third_party/WebKit/public/web/WebView.h" 19 #include "third_party/WebKit/public/web/WebView.h"
19 #include "webkit/glue/webkit_glue.h" 20 #include "webkit/glue/webkit_glue.h"
20 21
21 using WebKit::WebFrame; 22 using WebKit::WebFrame;
23 using WebKit::WebRuntimeFeatures;
22 using WebTestRunner::WebTestDelegate; 24 using WebTestRunner::WebTestDelegate;
23 using WebTestRunner::WebTestInterfaces; 25 using WebTestRunner::WebTestInterfaces;
24 26
25 namespace content { 27 namespace content {
26 28
27 namespace { 29 namespace {
28 ShellRenderProcessObserver* g_instance = NULL; 30 ShellRenderProcessObserver* g_instance = NULL;
29 } 31 }
30 32
31 // static 33 // static
(...skipping 29 matching lines...) Expand all
61 } 63 }
62 64
63 void ShellRenderProcessObserver::WebKitInitialized() { 65 void ShellRenderProcessObserver::WebKitInitialized() {
64 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) 66 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
65 return; 67 return;
66 68
67 // We always expose GC to layout tests. 69 // We always expose GC to layout tests.
68 webkit_glue::SetJavaScriptFlags(" --expose-gc"); 70 webkit_glue::SetJavaScriptFlags(" --expose-gc");
69 RenderThread::Get()->RegisterExtension(extensions_v8::GCExtension::Get()); 71 RenderThread::Get()->RegisterExtension(extensions_v8::GCExtension::Get());
70 72
73 if (!CommandLine::ForCurrentProcess()->HasSwitch(
74 switches::kStableReleaseMode))
jochen (gone - plz use gerrit) 2013/08/20 08:24:33 nit. add { } please
Julien - ping for review 2013/08/20 14:49:36 Done.
75 WebRuntimeFeatures::enableTestOnlyFeatures(true);
76
71 test_interfaces_.reset(new WebTestInterfaces); 77 test_interfaces_.reset(new WebTestInterfaces);
72 test_interfaces_->resetAll(); 78 test_interfaces_->resetAll();
73 } 79 }
74 80
75 bool ShellRenderProcessObserver::OnControlMessageReceived( 81 bool ShellRenderProcessObserver::OnControlMessageReceived(
76 const IPC::Message& message) { 82 const IPC::Message& message) {
77 bool handled = true; 83 bool handled = true;
78 IPC_BEGIN_MESSAGE_MAP(ShellRenderProcessObserver, message) 84 IPC_BEGIN_MESSAGE_MAP(ShellRenderProcessObserver, message)
79 IPC_MESSAGE_HANDLER(ShellViewMsg_SetWebKitSourceDir, OnSetWebKitSourceDir) 85 IPC_MESSAGE_HANDLER(ShellViewMsg_SetWebKitSourceDir, OnSetWebKitSourceDir)
80 IPC_MESSAGE_UNHANDLED(handled = false) 86 IPC_MESSAGE_UNHANDLED(handled = false)
81 IPC_END_MESSAGE_MAP() 87 IPC_END_MESSAGE_MAP()
82 88
83 return handled; 89 return handled;
84 } 90 }
85 91
86 void ShellRenderProcessObserver::OnSetWebKitSourceDir( 92 void ShellRenderProcessObserver::OnSetWebKitSourceDir(
87 const base::FilePath& webkit_source_dir) { 93 const base::FilePath& webkit_source_dir) {
88 webkit_source_dir_ = webkit_source_dir; 94 webkit_source_dir_ = webkit_source_dir;
89 } 95 }
90 96
91 } // namespace content 97 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/common/shell_switches.cc ('k') | content/shell/shell_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698