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" |
7 | 8 |
8 namespace { | 9 namespace { |
9 | 10 |
10 class RenderViewHostTest : public RenderViewHostTestHarness { | 11 class RenderViewHostTest : public RenderViewHostTestHarness { |
11 }; | 12 }; |
12 | 13 |
13 } // namespace | 14 } // namespace |
14 | 15 |
15 // All about URLs reported by the renderer should get rewritten to about:blank. | 16 // All about URLs reported by the renderer should get rewritten to about:blank. |
16 // See RenderViewHost::OnMsgNavigate for a discussion. | 17 // See RenderViewHost::OnMsgNavigate for a discussion. |
17 TEST_F(RenderViewHostTest, FilterAbout) { | 18 TEST_F(RenderViewHostTest, FilterAbout) { |
18 rvh()->SendNavigate(1, GURL("about:cache")); | 19 rvh()->SendNavigate(1, GURL(chrome::kAboutCacheURL)); |
19 ASSERT_TRUE(controller_->GetActiveEntry()); | 20 ASSERT_TRUE(controller_->GetActiveEntry()); |
20 EXPECT_EQ(GURL("about:blank"), controller_->GetActiveEntry()->url()); | 21 EXPECT_EQ(GURL(chrome::kAboutBlankURL), controller_->GetActiveEntry()->url()); |
21 } | 22 } |
OLD | NEW |