| 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/dom_ui/new_tab_ui.h" | 5 #include "chrome/browser/dom_ui/new_tab_ui.h" |
| 6 #include "chrome/browser/renderer_host/test_render_view_host.h" | 6 #include "chrome/browser/renderer_host/test_render_view_host.h" |
| 7 #include "chrome/common/url_constants.h" | 7 #include "chrome/common/url_constants.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 class DOMUITest : public RenderViewHostTestHarness { | 10 class DOMUITest : public RenderViewHostTestHarness { |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 rvh()->SendNavigate(1, std_url); | 130 rvh()->SendNavigate(1, std_url); |
| 131 EXPECT_TRUE(contents()->ShouldDisplayURL()); | 131 EXPECT_TRUE(contents()->ShouldDisplayURL()); |
| 132 EXPECT_TRUE(contents()->ShouldDisplayFavIcon()); | 132 EXPECT_TRUE(contents()->ShouldDisplayFavIcon()); |
| 133 EXPECT_FALSE(contents()->IsBookmarkBarAlwaysVisible()); | 133 EXPECT_FALSE(contents()->IsBookmarkBarAlwaysVisible()); |
| 134 EXPECT_FALSE(contents()->FocusLocationBarByDefault()); | 134 EXPECT_FALSE(contents()->FocusLocationBarByDefault()); |
| 135 | 135 |
| 136 // Start a pending load for a DOMUI. | 136 // Start a pending load for a DOMUI. |
| 137 GURL new_tab_url(chrome::kChromeUINewTabURL); | 137 GURL new_tab_url(chrome::kChromeUINewTabURL); |
| 138 controller()->LoadURL(new_tab_url, GURL(), PageTransition::LINK); | 138 controller()->LoadURL(new_tab_url, GURL(), PageTransition::LINK); |
| 139 EXPECT_FALSE(contents()->ShouldDisplayURL()); | 139 EXPECT_FALSE(contents()->ShouldDisplayURL()); |
| 140 EXPECT_FALSE(contents()->ShouldDisplayFavIcon()); | 140 EXPECT_TRUE(contents()->ShouldDisplayFavIcon()); |
| 141 EXPECT_FALSE(contents()->IsBookmarkBarAlwaysVisible()); | 141 EXPECT_FALSE(contents()->IsBookmarkBarAlwaysVisible()); |
| 142 EXPECT_TRUE(contents()->FocusLocationBarByDefault()); | 142 EXPECT_TRUE(contents()->FocusLocationBarByDefault()); |
| 143 | 143 |
| 144 // Committing DOM UI is tested above. | 144 // Committing DOM UI is tested above. |
| 145 } | 145 } |
| OLD | NEW |