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

Side by Side Diff: content/browser/web_contents/web_contents_impl_unittest.cc

Issue 185993008: Moving DidFinishLoad from RenderView to RenderFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes based on Charlie's review. Created 6 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/common/frame_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/logging.h" 5 #include "base/logging.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "content/browser/frame_host/interstitial_page_impl.h" 7 #include "content/browser/frame_host/interstitial_page_impl.h"
8 #include "content/browser/frame_host/navigation_entry_impl.h" 8 #include "content/browser/frame_host/navigation_entry_impl.h"
9 #include "content/browser/renderer_host/cross_site_transferring_request.h" 9 #include "content/browser/renderer_host/cross_site_transferring_request.h"
10 #include "content/browser/renderer_host/render_view_host_impl.h" 10 #include "content/browser/renderer_host/render_view_host_impl.h"
(...skipping 2131 matching lines...) Expand 10 before | Expand all | Expand 10 after
2142 // about:blank 2142 // about:blank
2143 GURL url_normalized(kAboutBlankURL); 2143 GURL url_normalized(kAboutBlankURL);
2144 GURL url_from_ipc("about:whatever"); 2144 GURL url_from_ipc("about:whatever");
2145 2145
2146 // We navigate the test WebContents to about:blank, since NavigateAndCommit 2146 // We navigate the test WebContents to about:blank, since NavigateAndCommit
2147 // will use the given URL to create the NavigationEntry as well, and that 2147 // will use the given URL to create the NavigationEntry as well, and that
2148 // entry should contain the filtered URL. 2148 // entry should contain the filtered URL.
2149 contents()->NavigateAndCommit(url_normalized); 2149 contents()->NavigateAndCommit(url_normalized);
2150 2150
2151 // Check that an IPC with about:whatever is correctly normalized. 2151 // Check that an IPC with about:whatever is correctly normalized.
2152 contents()->TestDidFinishLoad(1, url_from_ipc, true); 2152 contents()->TestDidFinishLoad(url_from_ipc, true);
2153 2153
2154 EXPECT_EQ(url_normalized, observer.last_url()); 2154 EXPECT_EQ(url_normalized, observer.last_url());
2155 2155
2156 // Create and navigate another WebContents. 2156 // Create and navigate another WebContents.
2157 scoped_ptr<TestWebContents> other_contents( 2157 scoped_ptr<TestWebContents> other_contents(
2158 static_cast<TestWebContents*>(CreateTestWebContents())); 2158 static_cast<TestWebContents*>(CreateTestWebContents()));
2159 TestWebContentsObserver other_observer(other_contents.get()); 2159 TestWebContentsObserver other_observer(other_contents.get());
2160 other_contents->NavigateAndCommit(url_normalized); 2160 other_contents->NavigateAndCommit(url_normalized);
2161 2161
2162 // Check that an IPC with about:whatever is correctly normalized. 2162 // Check that an IPC with about:whatever is correctly normalized.
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
2317 dy = 0; 2317 dy = 0;
2318 event = SyntheticWebMouseWheelEventBuilder::Build(2, dy, modifiers, false); 2318 event = SyntheticWebMouseWheelEventBuilder::Build(2, dy, modifiers, false);
2319 EXPECT_FALSE(contents()->HandleWheelEvent(event)); 2319 EXPECT_FALSE(contents()->HandleWheelEvent(event));
2320 EXPECT_EQ(0, delegate->GetAndResetContentsZoomChangedCallCount()); 2320 EXPECT_EQ(0, delegate->GetAndResetContentsZoomChangedCallCount());
2321 2321
2322 // Ensure pointers to the delegate aren't kept beyond it's lifetime. 2322 // Ensure pointers to the delegate aren't kept beyond it's lifetime.
2323 contents()->SetDelegate(NULL); 2323 contents()->SetDelegate(NULL);
2324 } 2324 }
2325 2325
2326 } // namespace content 2326 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698