OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/renderer_host/test_render_view_host.h" | 5 #include "chrome/browser/renderer_host/test_render_view_host.h" |
6 #include "chrome/browser/tab_contents/navigation_entry.h" | 6 #include "chrome/browser/tab_contents/navigation_entry.h" |
7 #include "chrome/common/url_constants.h" | |
8 | 7 |
9 namespace { | 8 namespace { |
10 | 9 |
11 class RenderViewHostTest : public RenderViewHostTestHarness { | 10 class RenderViewHostTest : public RenderViewHostTestHarness { |
12 }; | 11 }; |
13 | 12 |
14 } // namespace | 13 } // namespace |
15 | 14 |
16 // All about URLs reported by the renderer should get rewritten to about:blank. | 15 // All about URLs reported by the renderer should get rewritten to about:blank. |
17 // See RenderViewHost::OnMsgNavigate for a discussion. | 16 // See RenderViewHost::OnMsgNavigate for a discussion. |
18 TEST_F(RenderViewHostTest, FilterAbout) { | 17 TEST_F(RenderViewHostTest, FilterAbout) { |
19 rvh()->SendNavigate(1, GURL(chrome::kAboutCacheURL)); | 18 rvh()->SendNavigate(1, GURL("about:cache")); |
20 ASSERT_TRUE(controller_->GetActiveEntry()); | 19 ASSERT_TRUE(controller_->GetActiveEntry()); |
21 EXPECT_EQ(GURL(chrome::kAboutBlankURL), controller_->GetActiveEntry()->url()); | 20 EXPECT_EQ(GURL("about:blank"), controller_->GetActiveEntry()->url()); |
22 } | 21 } |
OLD | NEW |