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

Side by Side Diff: content/renderer/render_view_impl.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_thread_impl.cc ('k') | content/shell/shell_render_process_observer.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/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 3439 matching lines...) Expand 10 before | Expand all | Expand 10 after
3450 params.url = error.unreachableURL; 3450 params.url = error.unreachableURL;
3451 params.showing_repost_interstitial = show_repost_interstitial; 3451 params.showing_repost_interstitial = show_repost_interstitial;
3452 Send(new ViewHostMsg_DidFailProvisionalLoadWithError( 3452 Send(new ViewHostMsg_DidFailProvisionalLoadWithError(
3453 routing_id_, params)); 3453 routing_id_, params));
3454 3454
3455 // Don't display an error page if this is simply a cancelled load. Aside 3455 // Don't display an error page if this is simply a cancelled load. Aside
3456 // from being dumb, WebCore doesn't expect it and it will cause a crash. 3456 // from being dumb, WebCore doesn't expect it and it will cause a crash.
3457 if (error.reason == net::ERR_ABORTED) 3457 if (error.reason == net::ERR_ABORTED)
3458 return; 3458 return;
3459 3459
3460 if (RenderThreadImpl::current()->skip_error_pages())
3461 return;
3462
3460 // Make sure we never show errors in view source mode. 3463 // Make sure we never show errors in view source mode.
3461 frame->enableViewSourceMode(false); 3464 frame->enableViewSourceMode(false);
3462 3465
3463 DocumentState* document_state = DocumentState::FromDataSource(ds); 3466 DocumentState* document_state = DocumentState::FromDataSource(ds);
3464 NavigationState* navigation_state = document_state->navigation_state(); 3467 NavigationState* navigation_state = document_state->navigation_state();
3465 3468
3466 // If this is a failed back/forward/reload navigation, then we need to do a 3469 // If this is a failed back/forward/reload navigation, then we need to do a
3467 // 'replace' load. This is necessary to avoid messing up session history. 3470 // 'replace' load. This is necessary to avoid messing up session history.
3468 // Otherwise, we do a normal load, which simulates a 'go' navigation as far 3471 // Otherwise, we do a normal load, which simulates a 'go' navigation as far
3469 // as session history is concerned. 3472 // as session history is concerned.
(...skipping 3122 matching lines...) Expand 10 before | Expand all | Expand 10 after
6592 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); 6595 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle);
6593 RenderProcess::current()->ReleaseTransportDIB(dib); 6596 RenderProcess::current()->ReleaseTransportDIB(dib);
6594 } 6597 }
6595 6598
6596 void RenderViewImpl::DidCommitCompositorFrame() { 6599 void RenderViewImpl::DidCommitCompositorFrame() {
6597 RenderWidget::DidCommitCompositorFrame(); 6600 RenderWidget::DidCommitCompositorFrame();
6598 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame()); 6601 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame());
6599 } 6602 }
6600 6603
6601 } // namespace content 6604 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | content/shell/shell_render_process_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698