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

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

Issue 12751007: Don't display navigation error pages during layout tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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/renderer/render_view_impl.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/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/common/content_client.h" 8 #include "content/public/common/content_client.h"
9 #include "content/public/renderer/render_view.h" 9 #include "content/public/renderer/render_view.h"
10 #include "content/public/renderer/render_thread.h" 10 #include "content/public/renderer/render_thread.h"
(...skipping 27 matching lines...) Expand all
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 DisableAppCacheLogging();
45 EnableDevToolsFrontendTesting(); 45 EnableDevToolsFrontendTesting();
46 EnableShortCircuitSizeUpdates(); 46 EnableShortCircuitSizeUpdates();
47 DoNotSendFocusEvents(); 47 DoNotSendFocusEvents();
48 DisableNavigationErrorPages();
48 } 49 }
49 50
50 ShellRenderProcessObserver::~ShellRenderProcessObserver() { 51 ShellRenderProcessObserver::~ShellRenderProcessObserver() {
51 CHECK(g_instance == this); 52 CHECK(g_instance == this);
52 g_instance = NULL; 53 g_instance = NULL;
53 } 54 }
54 55
55 void ShellRenderProcessObserver::SetTestDelegate(WebTestDelegate* delegate) { 56 void ShellRenderProcessObserver::SetTestDelegate(WebTestDelegate* delegate) {
56 test_interfaces_->setDelegate(delegate); 57 test_interfaces_->setDelegate(delegate);
57 test_delegate_ = delegate; 58 test_delegate_ = delegate;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 void ShellRenderProcessObserver::OnLoadHyphenDictionary( 104 void ShellRenderProcessObserver::OnLoadHyphenDictionary(
104 const IPC::PlatformFileForTransit& dict_file) { 105 const IPC::PlatformFileForTransit& dict_file) {
105 ShellContentRendererClient* renderer_client = 106 ShellContentRendererClient* renderer_client =
106 static_cast<content::ShellContentRendererClient*>( 107 static_cast<content::ShellContentRendererClient*>(
107 content::GetContentClient()->renderer()); 108 content::GetContentClient()->renderer());
108 renderer_client->LoadHyphenDictionary( 109 renderer_client->LoadHyphenDictionary(
109 IPC::PlatformFileForTransitToPlatformFile(dict_file)); 110 IPC::PlatformFileForTransitToPlatformFile(dict_file));
110 } 111 }
111 112
112 } // namespace content 113 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/test/layouttest_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698