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

Unified Diff: chrome/test/chromedriver/chrome.h

Issue 11639019: [chromedriver] Implement SwitchToFrame command. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/chrome_tests.gypi ('k') | chrome/test/chromedriver/chrome_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/chrome.h
diff --git a/chrome/test/chromedriver/chrome.h b/chrome/test/chromedriver/chrome.h
index c7a6e5c51550573aa2e7af9c817d1d62a954156e..87f98bf9390afccf6ed9284ffbbdb1d974d0445a 100644
--- a/chrome/test/chromedriver/chrome.h
+++ b/chrome/test/chromedriver/chrome.h
@@ -20,12 +20,36 @@ class Chrome {
public:
virtual ~Chrome() {}
+ // Load a given URL in the main frame.
virtual Status Load(const std::string& url) = 0;
- virtual Status EvaluateScript(const std::string& expression,
+
+ // Evaluates a JavaScript expression in a specified frame and returns
+ // the result. |frame| is a frame ID or an empty string for the main frame.
+ // If the expression evaluates to a element, it will be bound to a unique ID
+ // (per frame) and the ID will be returned.
+ virtual Status EvaluateScript(const std::string& frame,
+ const std::string& expression,
scoped_ptr<base::Value>* result) = 0;
- virtual Status CallFunction(const std::string& function,
+
+ // Calls a JavaScript function in a specified frame with the given args and
+ // returns the result. |frame| is a frame ID or an empty string for the main
+ // frame. |args| may contain IDs that refer to previously returned elements.
+ // These will be translated back to their referred objects before invoking the
+ // function.
+ virtual Status CallFunction(const std::string& frame,
+ const std::string& function,
const base::ListValue& args,
scoped_ptr<base::Value>* result) = 0;
+
+ // Gets the frame ID for a frame element returned by invoking the given
+ // JavaScript function. |frame| is a frame ID or an empty string for the main
+ // frame.
+ virtual Status GetFrameByFunction(const std::string& frame,
+ const std::string& function,
+ const base::ListValue& args,
+ std::string* out_frame) = 0;
+
+ // Quits Chrome.
virtual Status Quit() = 0;
};
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/chromedriver/chrome_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698