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

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
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..971ad92b09268f136458e34cd8e1b34dd341faf4 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,59 @@ 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;
+
+ virtual void ExecuteGet(Response* const response) OVERRIDE;
Huyen 2011/12/08 02:10:32 maybe add comments stating this method gets all th
kkania 2011/12/08 17:31:21 Done.
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ViewsCommand);
+};
+
} // namespace webdriver
#endif // CHROME_TEST_WEBDRIVER_COMMANDS_CHROME_COMMANDS_H_

Powered by Google App Engine
This is Rietveld 408576698