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

Unified Diff: chrome/test/webdriver/commands/chrome_commands.h

Issue 8806030: Add commands to Chrome WebDriver for installing and manipulating extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years 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/automation/tab_proxy.cc ('k') | chrome/test/webdriver/commands/chrome_commands.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/webdriver/commands/chrome_commands.h
diff --git a/chrome/test/webdriver/commands/chrome_commands.h b/chrome/test/webdriver/commands/chrome_commands.h
index 22f90b29f684460e1ec003f2e473978322646272..c84f5d4228af3492c590ece7c7c4f975d8a28bfa 100644
--- a/chrome/test/webdriver/commands/chrome_commands.h
+++ b/chrome/test/webdriver/commands/chrome_commands.h
@@ -19,6 +19,7 @@ namespace webdriver {
class Response;
+// Commands dealing with the extensions system.
class ExtensionsCommand : public WebDriverCommand {
public:
ExtensionsCommand(const std::vector<std::string>& path_segments,
@@ -28,13 +29,60 @@ class ExtensionsCommand : public WebDriverCommand {
virtual bool DoesGet() OVERRIDE;
virtual bool DoesPost() OVERRIDE;
+ // Returns all installed extensions.
virtual void ExecuteGet(Response* const response) OVERRIDE;
+
+ // Installs an extension.
virtual void ExecutePost(Response* const response) OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(ExtensionsCommand);
};
+// Commands dealing with a particular extension.
+class ExtensionCommand : public WebDriverCommand {
+ public:
+ ExtensionCommand(const std::vector<std::string>& path_segments,
+ const base::DictionaryValue* const parameters);
+ virtual ~ExtensionCommand();
+
+ virtual bool Init(Response* const response) OVERRIDE;
+
+ virtual bool DoesGet() OVERRIDE;
+ virtual bool DoesPost() OVERRIDE;
+ virtual bool DoesDelete() OVERRIDE;
+
+ // Returns information about the extension.
+ virtual void ExecuteGet(Response* const response) OVERRIDE;
+
+ // Modifies the extension.
+ virtual void ExecutePost(Response* const response) OVERRIDE;
+
+ // Uninstalls the extension.
+ virtual void ExecuteDelete(Response* const response) OVERRIDE;
+
+ private:
+ std::string extension_id_;
+
+ DISALLOW_COPY_AND_ASSIGN(ExtensionCommand);
+};
+
+// Commands dealing with targeting non-tab views.
+class ViewsCommand : public WebDriverCommand {
+ public:
+ ViewsCommand(const std::vector<std::string>& path_segments,
+ const base::DictionaryValue* const parameters);
+ virtual ~ViewsCommand();
+
+ virtual bool DoesGet() OVERRIDE;
+
+ // Returns all open views.
+ virtual void ExecuteGet(Response* const response) OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ViewsCommand);
+};
+
} // namespace webdriver
#endif // CHROME_TEST_WEBDRIVER_COMMANDS_CHROME_COMMANDS_H_
« no previous file with comments | « chrome/test/automation/tab_proxy.cc ('k') | chrome/test/webdriver/commands/chrome_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698