summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents/web_contents_unittest.cc
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-11 21:46:53 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-11 21:46:53 +0000
commit212b7ae16eb243fcc59a04bc67b0c1293dbd1390 (patch)
tree4ab9a3355bc53bfdcd9ad92894bf5f308ecf1c6f /chrome/browser/tab_contents/web_contents_unittest.cc
parent70e2e4a95a549e6b86443bd50454e76c195ebd6a (diff)
downloadchromium_src-212b7ae16eb243fcc59a04bc67b0c1293dbd1390.zip
chromium_src-212b7ae16eb243fcc59a04bc67b0c1293dbd1390.tar.gz
chromium_src-212b7ae16eb243fcc59a04bc67b0c1293dbd1390.tar.bz2
Make sure view-source: is applied to RenderView when it is reused for a new
navigation. On page loading errors, WebFrameImpl::DidFail() will call RenderView::OnEnableViewSourceMode(false) not to show error pages in view source mode. We should overwrite the mode for new navigations not to show view-source: added inputs in non view-source mode. This fix is related to http://code.google.com/p/chromium/issues/detail?id=4516 But this doesn't resolve reloading case. BUG=none TEST=1) View some site using view-source:. 2) let the site return error for example 404 Not Found, and then view using view-source:. 3) make it 200 again and view using view-source:. It must show source code. Original review: http://codereview.chromium.org/119233 Patch by tyoshino@google.com git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18211 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/web_contents_unittest.cc')
-rw-r--r--chrome/browser/tab_contents/web_contents_unittest.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/tab_contents/web_contents_unittest.cc b/chrome/browser/tab_contents/web_contents_unittest.cc
index 5db8bb8..ac425d6 100644
--- a/chrome/browser/tab_contents/web_contents_unittest.cc
+++ b/chrome/browser/tab_contents/web_contents_unittest.cc
@@ -221,7 +221,7 @@ TEST_F(TabContentsTest, NTPViewSource) {
controller().LoadURL(kGURL, GURL(), PageTransition::TYPED);
rvh()->delegate()->RenderViewCreated(rvh());
// Did we get the expected message?
- EXPECT_TRUE(process()->sink().GetUniqueMessageMatching(
+ EXPECT_TRUE(process()->sink().GetFirstMessageMatching(
ViewMsg_EnableViewSourceMode::ID));
ViewHostMsg_FrameNavigate_Params params;