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

Unified Diff: content/shell/test_runner/test_runner.cc

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 | « content/renderer/render_frame_impl.cc ('k') | third_party/WebKit/Source/web/WebRemoteFrameImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/test_runner/test_runner.cc
diff --git a/content/shell/test_runner/test_runner.cc b/content/shell/test_runner/test_runner.cc
index 416872b6dd72e472d33fe6b80dabde23fe84a790..9763472d529cb9c09848472b1dbf58f8eb30f32e 100644
--- a/content/shell/test_runner/test_runner.cc
+++ b/content/shell/test_runner/test_runner.cc
@@ -2558,8 +2558,12 @@ void TestRunner::DumpPermissionClientCallbacks() {
void TestRunner::SetDisallowedSubresourcePathSuffixes(
const std::vector<std::string>& suffixes) {
DCHECK(main_view_);
- main_view_->MainFrame()->DataSource()->SetSubresourceFilter(
- new MockWebDocumentSubresourceFilter(suffixes));
+ if (!main_view_->MainFrame()->IsWebLocalFrame())
+ return;
+ main_view_->MainFrame()
+ ->ToWebLocalFrame()
+ ->DataSource()
+ ->SetSubresourceFilter(new MockWebDocumentSubresourceFilter(suffixes));
}
void TestRunner::DumpSpellCheckCallbacks() {
@@ -2791,7 +2795,11 @@ void TestRunner::CheckResponseMimeType() {
if (!main_view_)
return;
- WebDataSource* data_source = main_view_->MainFrame()->DataSource();
+ if (!main_view_->MainFrame()->IsWebLocalFrame())
+ return;
+
+ WebDataSource* data_source =
+ main_view_->MainFrame()->ToWebLocalFrame()->DataSource();
if (!data_source)
return;
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | third_party/WebKit/Source/web/WebRemoteFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698