OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser_thread.h" | 5 #include "chrome/browser/browser_thread.h" |
6 #include "chrome/browser/browser_url_handler.h" | 6 #include "chrome/browser/browser_url_handler.h" |
7 #include "chrome/browser/renderer_host/site_instance.h" | 7 #include "chrome/browser/renderer_host/site_instance.h" |
8 #include "chrome/browser/renderer_host/test/test_render_view_host.h" | 8 #include "chrome/browser/renderer_host/test/test_render_view_host.h" |
9 #include "chrome/browser/tab_contents/navigation_controller.h" | 9 #include "chrome/browser/tab_contents/navigation_controller.h" |
10 #include "chrome/browser/tab_contents/navigation_entry.h" | 10 #include "chrome/browser/tab_contents/navigation_entry.h" |
11 #include "chrome/browser/tab_contents/render_view_host_manager.h" | 11 #include "chrome/browser/tab_contents/render_view_host_manager.h" |
12 #include "chrome/browser/tab_contents/test_tab_contents.h" | 12 #include "chrome/browser/tab_contents/test_tab_contents.h" |
| 13 #include "chrome/common/notification_details.h" |
| 14 #include "chrome/common/notification_source.h" |
13 #include "chrome/common/render_messages.h" | 15 #include "chrome/common/render_messages.h" |
14 #include "chrome/common/render_messages_params.h" | 16 #include "chrome/common/render_messages_params.h" |
15 #include "chrome/common/url_constants.h" | 17 #include "chrome/common/url_constants.h" |
16 #include "chrome/test/test_notification_tracker.h" | 18 #include "chrome/test/test_notification_tracker.h" |
17 #include "chrome/test/testing_profile.h" | 19 #include "chrome/test/testing_profile.h" |
18 #include "ipc/ipc_message.h" | 20 #include "ipc/ipc_message.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
20 | 22 |
21 class RenderViewHostManagerTest : public RenderViewHostTestHarness { | 23 class RenderViewHostManagerTest : public RenderViewHostTestHarness { |
22 public: | 24 public: |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 // That should have cancelled the pending RVH, and the evil RVH should be the | 339 // That should have cancelled the pending RVH, and the evil RVH should be the |
338 // current one. | 340 // current one. |
339 EXPECT_TRUE(contents()->render_manager()->pending_render_view_host() == NULL); | 341 EXPECT_TRUE(contents()->render_manager()->pending_render_view_host() == NULL); |
340 EXPECT_EQ(evil_rvh, contents()->render_manager()->current_host()); | 342 EXPECT_EQ(evil_rvh, contents()->render_manager()->current_host()); |
341 | 343 |
342 // Also we should not have a pending navigation entry. | 344 // Also we should not have a pending navigation entry. |
343 NavigationEntry* entry = contents()->controller().GetActiveEntry(); | 345 NavigationEntry* entry = contents()->controller().GetActiveEntry(); |
344 ASSERT_TRUE(entry != NULL); | 346 ASSERT_TRUE(entry != NULL); |
345 EXPECT_EQ(url2, entry->url()); | 347 EXPECT_EQ(url2, entry->url()); |
346 } | 348 } |
OLD | NEW |