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

Unified Diff: third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Issue 2918403003: Move [Provisional]DataSource accessors/methods from WebFrame to WebLocalFrame. (Closed)
Patch Set: Added a TODO comment for user agent overrides - https://crbug.com/426555 Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp ('k') | third_party/WebKit/public/web/WebFrame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/tests/WebFrameTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
index a975b355dc197db3a15b3a355f32736d3ebc6a04..38e4ecf9ce8e2ddf96916aed9a65d16491f0e62e 100644
--- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -4347,7 +4347,7 @@ TEST_P(ParameterizedWebFrameTest, ReloadWhileProvisional) {
web_view_helper.WebView()->MainFrame());
WebDataSource* data_source =
- web_view_helper.WebView()->MainFrame()->DataSource();
+ web_view_helper.WebView()->MainFrameImpl()->DataSource();
ASSERT_TRUE(data_source);
EXPECT_EQ(ToKURL(base_url_ + "fixed_layout.html"),
KURL(data_source->GetRequest().Url()));
@@ -4361,7 +4361,7 @@ TEST_P(ParameterizedWebFrameTest, AppendRedirects) {
web_view_helper.InitializeAndLoad(first_url, true);
WebDataSource* data_source =
- web_view_helper.WebView()->MainFrame()->DataSource();
+ web_view_helper.WebView()->MainFrameImpl()->DataSource();
ASSERT_TRUE(data_source);
data_source->AppendRedirect(ToKURL(second_url));
@@ -4386,8 +4386,8 @@ TEST_P(ParameterizedWebFrameTest, IframeRedirect) {
WebFrame* iframe =
web_view_helper.WebView()->MainFrameImpl()->FindFrameByName(
WebString::FromUTF8("ifr"));
- ASSERT_TRUE(iframe);
- WebDataSource* iframe_data_source = iframe->DataSource();
+ ASSERT_TRUE(iframe && iframe->IsWebLocalFrame());
+ WebDataSource* iframe_data_source = iframe->ToWebLocalFrame()->DataSource();
ASSERT_TRUE(iframe_data_source);
WebVector<WebURL> redirects;
iframe_data_source->RedirectChain(redirects);
@@ -7341,7 +7341,7 @@ TEST_P(ParameterizedWebFrameTest, BackToReload) {
FrameTestHelpers::WebViewHelper web_view_helper;
web_view_helper.InitializeAndLoad(base_url_ + "fragment_middle_click.html",
true);
- WebFrame* frame = web_view_helper.WebView()->MainFrame();
+ WebLocalFrame* frame = web_view_helper.WebView()->MainFrameImpl();
const FrameLoader& main_frame_loader =
web_view_helper.WebView()->MainFrameImpl()->GetFrame()->Loader();
Persistent<HistoryItem> first_item =
@@ -7400,7 +7400,7 @@ TEST_P(ParameterizedWebFrameTest, ReloadPost) {
RegisterMockedHttpURLLoad("reload_post.html");
FrameTestHelpers::WebViewHelper web_view_helper;
web_view_helper.InitializeAndLoad(base_url_ + "reload_post.html", true);
- WebFrame* frame = web_view_helper.WebView()->MainFrame();
+ WebLocalFrame* frame = web_view_helper.WebView()->MainFrameImpl();
FrameTestHelpers::LoadFrame(web_view_helper.WebView()->MainFrame(),
"javascript:document.forms[0].submit()");
@@ -7423,7 +7423,7 @@ TEST_P(ParameterizedWebFrameTest, LoadHistoryItemReload) {
FrameTestHelpers::WebViewHelper web_view_helper;
web_view_helper.InitializeAndLoad(base_url_ + "fragment_middle_click.html",
true);
- WebFrame* frame = web_view_helper.WebView()->MainFrame();
+ WebLocalFrame* frame = web_view_helper.WebView()->MainFrameImpl();
const FrameLoader& main_frame_loader =
web_view_helper.WebView()->MainFrameImpl()->GetFrame()->Loader();
Persistent<HistoryItem> first_item =
@@ -8729,7 +8729,7 @@ TEST_P(ParameterizedWebFrameTest, ReloadBypassingCache) {
RegisterMockedHttpURLLoad("foo.html");
FrameTestHelpers::WebViewHelper web_view_helper;
web_view_helper.InitializeAndLoad(base_url_ + "foo.html", true);
- WebFrame* frame = web_view_helper.WebView()->MainFrame();
+ WebLocalFrame* frame = web_view_helper.WebView()->MainFrameImpl();
FrameTestHelpers::ReloadFrameBypassingCache(frame);
EXPECT_EQ(WebCachePolicy::kBypassingCache,
frame->DataSource()->GetRequest().GetCachePolicy());
« no previous file with comments | « third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp ('k') | third_party/WebKit/public/web/WebFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698