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

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

Issue 6705012: Move the rest of the content browser->renderer messages to content. Also move drag related messa... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 months 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 "chrome/browser/browser_url_handler.h" 5 #include "chrome/browser/browser_url_handler.h"
6 #include "chrome/common/render_messages.h" 6 #include "chrome/common/render_messages.h"
7 #include "chrome/common/render_messages_params.h"
8 #include "chrome/common/url_constants.h" 7 #include "chrome/common/url_constants.h"
9 #include "chrome/test/test_notification_tracker.h" 8 #include "chrome/test/test_notification_tracker.h"
10 #include "chrome/test/testing_profile.h" 9 #include "chrome/test/testing_profile.h"
11 #include "content/browser/browser_thread.h" 10 #include "content/browser/browser_thread.h"
12 #include "content/browser/renderer_host/test_render_view_host.h" 11 #include "content/browser/renderer_host/test_render_view_host.h"
13 #include "content/browser/site_instance.h" 12 #include "content/browser/site_instance.h"
14 #include "content/browser/tab_contents/navigation_controller.h" 13 #include "content/browser/tab_contents/navigation_controller.h"
15 #include "content/browser/tab_contents/navigation_entry.h" 14 #include "content/browser/tab_contents/navigation_entry.h"
16 #include "content/browser/tab_contents/render_view_host_manager.h" 15 #include "content/browser/tab_contents/render_view_host_manager.h"
17 #include "content/browser/tab_contents/test_tab_contents.h" 16 #include "content/browser/tab_contents/test_tab_contents.h"
18 #include "content/common/notification_details.h" 17 #include "content/common/notification_details.h"
19 #include "content/common/notification_source.h" 18 #include "content/common/notification_source.h"
20 #include "content/common/page_transition_types.h" 19 #include "content/common/page_transition_types.h"
20 #include "content/common/view_messages.h"
21 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
22 #include "webkit/glue/webkit_glue.h" 22 #include "webkit/glue/webkit_glue.h"
23 23
24 class RenderViewHostManagerTest : public RenderViewHostTestHarness { 24 class RenderViewHostManagerTest : public RenderViewHostTestHarness {
25 public: 25 public:
26 void NavigateActiveAndCommit(const GURL& url) { 26 void NavigateActiveAndCommit(const GURL& url) {
27 // Note: we navigate the active RenderViewHost because previous navigations 27 // Note: we navigate the active RenderViewHost because previous navigations
28 // won't have committed yet, so NavigateAndCommit does the wrong thing 28 // won't have committed yet, so NavigateAndCommit does the wrong thing
29 // for us. 29 // for us.
30 controller().LoadURL(url, GURL(), PageTransition::LINK); 30 controller().LoadURL(url, GURL(), PageTransition::LINK);
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 // That should have cancelled the pending RVH, and the evil RVH should be the 337 // That should have cancelled the pending RVH, and the evil RVH should be the
338 // current one. 338 // current one.
339 EXPECT_TRUE(contents()->render_manager()->pending_render_view_host() == NULL); 339 EXPECT_TRUE(contents()->render_manager()->pending_render_view_host() == NULL);
340 EXPECT_EQ(evil_rvh, contents()->render_manager()->current_host()); 340 EXPECT_EQ(evil_rvh, contents()->render_manager()->current_host());
341 341
342 // Also we should not have a pending navigation entry. 342 // Also we should not have a pending navigation entry.
343 NavigationEntry* entry = contents()->controller().GetActiveEntry(); 343 NavigationEntry* entry = contents()->controller().GetActiveEntry();
344 ASSERT_TRUE(entry != NULL); 344 ASSERT_TRUE(entry != NULL);
345 EXPECT_EQ(url2, entry->url()); 345 EXPECT_EQ(url2, entry->url());
346 } 346 }
OLDNEW
« no previous file with comments | « content/browser/tab_contents/render_view_host_manager.cc ('k') | content/browser/worker_host/worker_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698