diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-20 19:17:58 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-20 19:17:58 +0000 |
commit | faf9cd6e0a9a3b8d6466c547cb9314c6af8dcdad (patch) | |
tree | 9a9ab40c4ddd6a08b717bd48b93342faf66dd92f /chrome/renderer | |
parent | 7ceeba70872aab6ac66a1043c9f1587b12fc6710 (diff) | |
download | chromium_src-faf9cd6e0a9a3b8d6466c547cb9314c6af8dcdad.zip chromium_src-faf9cd6e0a9a3b8d6466c547cb9314c6af8dcdad.tar.gz chromium_src-faf9cd6e0a9a3b8d6466c547cb9314c6af8dcdad.tar.bz2 |
Use the same code to handle both overridable and fatal
certificate errors. The only difference is that the SSL
interstial page for fatal certificate errors has only one
button ("Back").
Copy ssl_roadpage.html to ssl_error.html, remove the
"proceed" button, and rename the "exit" button to "back".
The local variable |html| in SSLBlockingPage::GetHTMLContents
should not be declared as static.
Remove SSLPolicy::ShowErrorPage and
RenderViewHost::LoadAlternateHTMLString.
R=abarth,jcivelli
BUG=41360
TEST=Type https://test-ssev.verisign.com:2443/test-SSEV-revoked-verisign.html
in the location bar and hit Enter. The location bar should display that URL
with a broken certificate error status, and the Back button on the SSL
interstitial page should work.
Review URL: http://codereview.chromium.org/1613016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45060 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/render_view.cc | 22 | ||||
-rw-r--r-- | chrome/renderer/render_view.h | 5 | ||||
-rw-r--r-- | chrome/renderer/render_view_unittest.cc | 21 |
3 files changed, 1 insertions, 47 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index b610897..530a820 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -554,7 +554,6 @@ void RenderView::OnMessageReceived(const IPC::Message& message) { IPC_MESSAGE_HANDLER(ViewMsg_Navigate, OnNavigate) IPC_MESSAGE_HANDLER(ViewMsg_Stop, OnStop) IPC_MESSAGE_HANDLER(ViewMsg_ReloadFrame, OnReloadFrame) - IPC_MESSAGE_HANDLER(ViewMsg_LoadAlternateHTMLText, OnLoadAlternateHTMLText) IPC_MESSAGE_HANDLER(ViewMsg_Undo, OnUndo) IPC_MESSAGE_HANDLER(ViewMsg_Redo, OnRedo) IPC_MESSAGE_HANDLER(ViewMsg_Cut, OnCut) @@ -1003,26 +1002,6 @@ void RenderView::OnReloadFrame() { } } -void RenderView::OnLoadAlternateHTMLText(const std::string& html, - bool new_navigation, - const GURL& display_url, - const std::string& security_info) { - if (!webview()) - return; - - pending_navigation_state_.reset(NavigationState::CreateBrowserInitiated( - new_navigation ? -1 : page_id_, - history_list_offset_, - PageTransition::LINK, - Time::Now())); - pending_navigation_state_->set_security_info(security_info); - - webview()->mainFrame()->loadHTMLString( - html, GURL(kUnreachableWebDataURL), display_url, !new_navigation); - - pending_navigation_state_.reset(); -} - void RenderView::OnCopyImageAt(int x, int y) { webview()->copyImageAt(WebPoint(x, y)); } @@ -4938,7 +4917,6 @@ bool RenderView::ScheduleFileChooser( } WebKit::WebGeolocationService* RenderView::geolocationService() { - if (!geolocation_dispatcher_.get()) geolocation_dispatcher_.reset(new GeolocationDispatcher(this)); return geolocation_dispatcher_.get(); diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h index 7277752..bfdf304 100644 --- a/chrome/renderer/render_view.h +++ b/chrome/renderer/render_view.h @@ -532,7 +532,6 @@ class RenderView : public RenderWidget, // For unit tests. friend class RenderViewTest; friend class PepperDeviceTest; - FRIEND_TEST(RenderViewTest, OnLoadAlternateHTMLText); FRIEND_TEST(RenderViewTest, OnNavStateChanged); FRIEND_TEST(RenderViewTest, OnImeStateChanged); FRIEND_TEST(RenderViewTest, ImeComposition); @@ -627,10 +626,6 @@ class RenderView : public RenderWidget, void OnNavigate(const ViewMsg_Navigate_Params& params); void OnStop(); void OnReloadFrame(); - void OnLoadAlternateHTMLText(const std::string& html_contents, - bool new_navigation, - const GURL& display_url, - const std::string& security_info); void OnUpdateTargetURLAck(); void OnUndo(); void OnRedo(); diff --git a/chrome/renderer/render_view_unittest.cc b/chrome/renderer/render_view_unittest.cc index d85396b..07dd695 100644 --- a/chrome/renderer/render_view_unittest.cc +++ b/chrome/renderer/render_view_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -36,25 +36,6 @@ static WebCompositionCommand ToCompositionCommand(int string_type) { } } -TEST_F(RenderViewTest, OnLoadAlternateHTMLText) { - // Test a new navigation. - GURL test_url("http://www.google.com/some_test_url"); - view_->OnLoadAlternateHTMLText("<html></html>", true, test_url, - std::string()); - - // We should have gotten two different types of start messages in the - // following order. - ASSERT_EQ((size_t)2, render_thread_.sink().message_count()); - const IPC::Message* msg = render_thread_.sink().GetMessageAt(0); - EXPECT_EQ(ViewHostMsg_DidStartLoading::ID, msg->type()); - - msg = render_thread_.sink().GetMessageAt(1); - EXPECT_EQ(ViewHostMsg_DidStartProvisionalLoadForFrame::ID, msg->type()); - ViewHostMsg_DidStartProvisionalLoadForFrame::Param start_params; - ViewHostMsg_DidStartProvisionalLoadForFrame::Read(msg, &start_params); - EXPECT_EQ(GURL("chrome://chromewebdata/"), start_params.b); -} - // Test that we get form state change notifications when input fields change. TEST_F(RenderViewTest, OnNavStateChanged) { // Don't want any delay for form state sync changes. This will still post a |