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/test_render_view_host.h" |
6 #include "chrome/browser/tab_contents/navigation_entry.h" | 6 #include "chrome/browser/tab_contents/navigation_entry.h" |
7 | 7 |
8 class RenderViewHostTest : public RenderViewHostTestHarness { | 8 class RenderViewHostTest : public RenderViewHostTestHarness { |
9 }; | 9 }; |
10 | 10 |
11 // All about URLs reported by the renderer should get rewritten to about:blank. | 11 // All about URLs reported by the renderer should get rewritten to about:blank. |
12 // See RenderViewHost::OnMsgNavigate for a discussion. | 12 // See RenderViewHost::OnMsgNavigate for a discussion. |
13 TEST_F(RenderViewHostTest, FilterAbout) { | 13 TEST_F(RenderViewHostTest, FilterAbout) { |
14 rvh()->SendNavigate(1, GURL("about:cache")); | 14 rvh()->SendNavigate(1, GURL("about:cache")); |
15 ASSERT_TRUE(controller().GetActiveEntry()); | 15 ASSERT_TRUE(controller().GetActiveEntry()); |
16 EXPECT_EQ(GURL("about:blank"), controller().GetActiveEntry()->url()); | 16 EXPECT_EQ(GURL("about:blank"), controller().GetActiveEntry()->url()); |
17 } | 17 } |
OLD | NEW |