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

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

Issue 6507015: Implement the target locator commands for ChromeDriver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 10 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: chrome/test/webdriver/commands/target_locator_commands.h
diff --git a/chrome/test/webdriver/commands/target_locator_commands.h b/chrome/test/webdriver/commands/target_locator_commands.h
new file mode 100644
index 0000000000000000000000000000000000000000..d9093ccd717fa0e258682a2f513922fa27c57fd8
--- /dev/null
+++ b/chrome/test/webdriver/commands/target_locator_commands.h
@@ -0,0 +1,84 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_TEST_WEBDRIVER_COMMANDS_TARGET_LOCATOR_COMMANDS_H_
+#define CHROME_TEST_WEBDRIVER_COMMANDS_TARGET_LOCATOR_COMMANDS_H_
+
+#include <string>
+#include <vector>
+
+#include "chrome/test/webdriver/commands/webdriver_command.h"
+
+class DictionaryValue;
+
+namespace webdriver {
+
+class Response;
+
+// Gets the current window handle.
+// REST URL: /session/:sessionId/window_handle
+class WindowHandleCommand : public WebDriverCommand {
+ public:
+ WindowHandleCommand(const std::vector<std::string>& path_segments,
+ DictionaryValue* parameters);
+ virtual ~WindowHandleCommand();
+
+ virtual bool DoesGet();
+ virtual void ExecuteGet(Response* const response);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(WindowHandleCommand);
+};
+
+// Gets a list of all window handles.
+// REST URL: /session/:sessionId/window_handles
+class WindowHandlesCommand : public WebDriverCommand {
+ public:
+ WindowHandlesCommand(const std::vector<std::string>& path_segments,
+ DictionaryValue* parameters);
+ virtual ~WindowHandlesCommand();
+
+ virtual bool DoesGet();
+ virtual void ExecuteGet(Response* const response);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(WindowHandlesCommand);
+};
+
+// Switches to the given window as the default window to execute commands on
+// or closes it.
+// REST URL: /session/:sessionId/window
+class WindowCommand : public WebDriverCommand {
+ public:
+ WindowCommand(const std::vector<std::string>& path_segments,
+ DictionaryValue* parameters);
+ virtual ~WindowCommand();
+
+ virtual bool DoesPost();
+ virtual bool DoesDelete();
+ virtual void ExecutePost(Response* const response);
+ virtual void ExecuteDelete(Response* const response);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(WindowCommand);
+};
+
+// Switches to the given frame as the default frame to execute commands in.
+// REST URL: /session/:sessionId/frame
+class SwitchFrameCommand : public WebDriverCommand {
+ public:
+ SwitchFrameCommand(const std::vector<std::string>& path_segments,
+ DictionaryValue* parameters);
+ virtual ~SwitchFrameCommand();
+
+ virtual bool DoesPost();
+ virtual void ExecutePost(Response* const response);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SwitchFrameCommand);
+};
+
+} // namespace webdriver
+
+#endif // CHROME_TEST_WEBDRIVER_COMMANDS_TARGET_LOCATOR_COMMANDS_H_
« no previous file with comments | « chrome/test/webdriver/commands/session_with_id.cc ('k') | chrome/test/webdriver/commands/target_locator_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698