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

Unified Diff: chrome/test/chromedriver/commands.cc

Issue 11746025: [chromedriver]Implement command: title. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Resolved merge conflict. Created 7 years, 11 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 | « chrome/test/chromedriver/commands.h ('k') | chrome/test/chromedriver/run_py_tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/commands.cc
diff --git a/chrome/test/chromedriver/commands.cc b/chrome/test/chromedriver/commands.cc
index 50f26c8454a7e82ed0f9324d6e8c33849271be7d..2b474f7affeeaf7be595f132c9d77847883530be 100644
--- a/chrome/test/chromedriver/commands.cc
+++ b/chrome/test/chromedriver/commands.cc
@@ -148,3 +148,19 @@ Status ExecuteSwitchToFrame(
session->frame = frame;
return Status(kOk);
}
+
+Status ExecuteGetTitle(
+ Session* session,
+ const base::DictionaryValue& params,
+ scoped_ptr<base::Value>* value) {
+ const char* kGetTitleScript =
+ "function() {"
+ " if (document.title)"
+ " return document.title;"
+ " else"
+ " return document.URL;"
+ "}";
+ base::ListValue args;
+ return session->chrome->CallFunction(
+ session->frame, kGetTitleScript, args, value);
+}
« no previous file with comments | « chrome/test/chromedriver/commands.h ('k') | chrome/test/chromedriver/run_py_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698