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

Unified Diff: components/test_runner/test_runner_for_specific_view.cc

Issue 2012823003: Move IME related functions from WebFrame to WebLocalFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add CHECK in TextInputController::HasMarkedText() Created 4 years, 5 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
Index: components/test_runner/test_runner_for_specific_view.cc
diff --git a/components/test_runner/test_runner_for_specific_view.cc b/components/test_runner/test_runner_for_specific_view.cc
index 3cc1fb7a9f1c331cbd0715647e6d908475a8ae47..11dfca60f51c252ed3fda101c77deee6a9b4b0ae 100644
--- a/components/test_runner/test_runner_for_specific_view.cc
+++ b/components/test_runner/test_runner_for_specific_view.cc
@@ -673,7 +673,11 @@ bool TestRunnerForSpecificView::FindString(
}
std::string TestRunnerForSpecificView::SelectionAsMarkup() {
- return web_view()->mainFrame()->selectionAsMarkup().utf8();
+ if (!web_view()->mainFrame()->toWebLocalFrame()) {
+ CHECK(false) << "This function cannot be called if the main frame is not a "
+ "local frame.";
+ }
+ return web_view()->mainFrame()->toWebLocalFrame()->selectionAsMarkup().utf8();
}
void TestRunnerForSpecificView::SetViewSourceForFrame(const std::string& name,
« no previous file with comments | « components/printing/renderer/print_web_view_helper.cc ('k') | components/test_runner/text_input_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698