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

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

Issue 2928033002: Move GetDocument method from WebFrame to WebLocalFrame. (Closed)
Patch Set: Split a DCHECK in two as suggested by boliu@. 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/shell/test_runner/test_runner.cc ('k') | content/shell/test_runner/text_input_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/test_runner/test_runner_for_specific_view.cc
diff --git a/content/shell/test_runner/test_runner_for_specific_view.cc b/content/shell/test_runner/test_runner_for_specific_view.cc
index 461646c11e0dc3d34d36de7c8ed538da065f018d..2cd02143d33380427e11b7994c6e769eaa94844c 100644
--- a/content/shell/test_runner/test_runner_for_specific_view.cc
+++ b/content/shell/test_runner/test_runner_for_specific_view.cc
@@ -298,11 +298,17 @@ void TestRunnerForSpecificView::CopyImageAtAndCapturePixelsAsyncThen(
void TestRunnerForSpecificView::GetManifestThen(
v8::Local<v8::Function> callback) {
+ if (!web_view()->MainFrame()->IsWebLocalFrame()) {
+ CHECK(false) << "This function cannot be called if the main frame is not a "
+ "local frame.";
+ }
+
v8::UniquePersistent<v8::Function> persistent_callback(
blink::MainThreadIsolate(), callback);
delegate()->FetchManifest(
- web_view(), web_view()->MainFrame()->GetDocument().ManifestURL(),
+ web_view(),
+ web_view()->MainFrame()->ToWebLocalFrame()->GetDocument().ManifestURL(),
base::Bind(&TestRunnerForSpecificView::GetManifestCallback,
weak_factory_.GetWeakPtr(),
base::Passed(std::move(persistent_callback))));
« no previous file with comments | « content/shell/test_runner/test_runner.cc ('k') | content/shell/test_runner/text_input_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698