Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Side by Side Diff: content/browser/tab_contents/render_view_host_manager_unittest.cc

Issue 8801003: Make TestTabContents::TestDidNavigate not take a ViewHostMsg_FrameNavigate_Params, since that's a... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Remove the accidental commenting out that I had done before last commit Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/browser/browser_thread_impl.h" 5 #include "content/browser/browser_thread_impl.h"
6 #include "content/browser/browser_url_handler.h" 6 #include "content/browser/browser_url_handler.h"
7 #include "content/browser/mock_content_browser_client.h" 7 #include "content/browser/mock_content_browser_client.h"
8 #include "content/browser/renderer_host/test_render_view_host.h" 8 #include "content/browser/renderer_host/test_render_view_host.h"
9 #include "content/browser/site_instance.h" 9 #include "content/browser/site_instance.h"
10 #include "content/browser/tab_contents/navigation_controller.h" 10 #include "content/browser/tab_contents/navigation_controller.h"
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 // Before that RVH has committed, the evil page reloads itself. 590 // Before that RVH has committed, the evil page reloads itself.
591 ViewHostMsg_FrameNavigate_Params params; 591 ViewHostMsg_FrameNavigate_Params params;
592 params.page_id = 1; 592 params.page_id = 1;
593 params.url = kUrl2; 593 params.url = kUrl2;
594 params.transition = content::PAGE_TRANSITION_CLIENT_REDIRECT; 594 params.transition = content::PAGE_TRANSITION_CLIENT_REDIRECT;
595 params.should_update_history = false; 595 params.should_update_history = false;
596 params.gesture = NavigationGestureAuto; 596 params.gesture = NavigationGestureAuto;
597 params.was_within_same_page = false; 597 params.was_within_same_page = false;
598 params.is_post = false; 598 params.is_post = false;
599 params.content_state = webkit_glue::CreateHistoryStateForURL(GURL(kUrl2)); 599 params.content_state = webkit_glue::CreateHistoryStateForURL(GURL(kUrl2));
600 contents()->TestDidNavigate(evil_rvh, params); 600 contents()->DidNavigate(evil_rvh, params);
601 601
602 // That should have cancelled the pending RVH, and the evil RVH should be the 602 // That should have cancelled the pending RVH, and the evil RVH should be the
603 // current one. 603 // current one.
604 EXPECT_TRUE(contents()->render_manager_for_testing()-> 604 EXPECT_TRUE(contents()->render_manager_for_testing()->
605 pending_render_view_host() == NULL); 605 pending_render_view_host() == NULL);
606 EXPECT_EQ(evil_rvh, contents()->render_manager_for_testing()->current_host()); 606 EXPECT_EQ(evil_rvh, contents()->render_manager_for_testing()->current_host());
607 607
608 // Also we should not have a pending navigation entry. 608 // Also we should not have a pending navigation entry.
609 NavigationEntry* entry = contents()->controller().GetActiveEntry(); 609 NavigationEntry* entry = contents()->controller().GetActiveEntry();
610 ASSERT_TRUE(entry != NULL); 610 ASSERT_TRUE(entry != NULL);
611 EXPECT_EQ(kUrl2, entry->url()); 611 EXPECT_EQ(kUrl2, entry->url());
612 } 612 }
OLDNEW
« no previous file with comments | « content/browser/debugger/devtools_manager_unittest.cc ('k') | content/browser/tab_contents/test_tab_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698