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 16026006: Introduce the notion of a "layout test mode" instead of turning individual flags on and off (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/app/shell_main_delegate.cc ('k') | content/test/layouttest_support.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"
(...skipping 23 matching lines...) Expand all
34 } 34 }
35 35
36 ShellRenderProcessObserver::ShellRenderProcessObserver() 36 ShellRenderProcessObserver::ShellRenderProcessObserver()
37 : main_test_runner_(NULL), 37 : main_test_runner_(NULL),
38 test_delegate_(NULL) { 38 test_delegate_(NULL) {
39 CHECK(!g_instance); 39 CHECK(!g_instance);
40 g_instance = this; 40 g_instance = this;
41 RenderThread::Get()->AddObserver(this); 41 RenderThread::Get()->AddObserver(this);
42 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) 42 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
43 return; 43 return;
44 DisableAppCacheLogging(); 44 EnableRendererLayoutTestMode();
45 EnableDevToolsFrontendTesting();
46 EnableShortCircuitSizeUpdates();
47 DoNotSendFocusEvents();
48 DisableNavigationErrorPages();
49 } 45 }
50 46
51 ShellRenderProcessObserver::~ShellRenderProcessObserver() { 47 ShellRenderProcessObserver::~ShellRenderProcessObserver() {
52 CHECK(g_instance == this); 48 CHECK(g_instance == this);
53 g_instance = NULL; 49 g_instance = NULL;
54 } 50 }
55 51
56 void ShellRenderProcessObserver::SetTestDelegate(WebTestDelegate* delegate) { 52 void ShellRenderProcessObserver::SetTestDelegate(WebTestDelegate* delegate) {
57 test_interfaces_->setDelegate(delegate); 53 test_interfaces_->setDelegate(delegate);
58 test_delegate_ = delegate; 54 test_delegate_ = delegate;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 webkit_source_dir_ = webkit_source_dir; 90 webkit_source_dir_ = webkit_source_dir;
95 } 91 }
96 92
97 void ShellRenderProcessObserver::OnLoadHyphenDictionary( 93 void ShellRenderProcessObserver::OnLoadHyphenDictionary(
98 const IPC::PlatformFileForTransit& dict_file) { 94 const IPC::PlatformFileForTransit& dict_file) {
99 ShellContentRendererClient::Get()->LoadHyphenDictionary( 95 ShellContentRendererClient::Get()->LoadHyphenDictionary(
100 IPC::PlatformFileForTransitToPlatformFile(dict_file)); 96 IPC::PlatformFileForTransitToPlatformFile(dict_file));
101 } 97 }
102 98
103 } // namespace content 99 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/app/shell_main_delegate.cc ('k') | content/test/layouttest_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698