diff options
| author | kkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-20 15:02:33 +0000 |
|---|---|---|
| committer | kkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-20 15:02:33 +0000 |
| commit | 2937a8c72bfd28188ccd0b3f3b54bc3303b5f537 (patch) | |
| tree | 384b91fec1c7736bee9ce5e61055e84febe2fcd5 /chrome/test/webdriver/commands/mouse_commands.h | |
| parent | cdca989154d270a6553c1c8e2df0122b521b49eb (diff) | |
| download | chromium_src-2937a8c72bfd28188ccd0b3f3b54bc3303b5f537.zip chromium_src-2937a8c72bfd28188ccd0b3f3b54bc3303b5f537.tar.gz chromium_src-2937a8c72bfd28188ccd0b3f3b54bc3303b5f537.tar.bz2 | |
Refactor error handling in chromedriver. Introduce new error class containing a webdriver error code, possible error details, and a stack trace.
Also some minor cleanup of the command files.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7042018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86081 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/webdriver/commands/mouse_commands.h')
| -rw-r--r-- | chrome/test/webdriver/commands/mouse_commands.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/chrome/test/webdriver/commands/mouse_commands.h b/chrome/test/webdriver/commands/mouse_commands.h index 4510ccf..cc6f931 100644 --- a/chrome/test/webdriver/commands/mouse_commands.h +++ b/chrome/test/webdriver/commands/mouse_commands.h @@ -9,11 +9,17 @@ #include <vector> #include "chrome/test/webdriver/commands/webelement_commands.h" +#include "chrome/test/webdriver/web_element_id.h" class DictionaryValue; +namespace gfx { +class Point; +} + namespace webdriver { +class Error; class Response; // Base class for the following API command classes. @@ -28,7 +34,7 @@ class ElementMouseCommand : public WebElementCommand { virtual bool DoesPost(); virtual void ExecutePost(Response* const response); - virtual bool Action(const gfx::Point& location, Response* const response) = 0; + virtual Error* Action(const gfx::Point& location) = 0; private: DISALLOW_COPY_AND_ASSIGN(ElementMouseCommand); @@ -46,7 +52,7 @@ class MoveAndClickCommand : public ElementMouseCommand { const DictionaryValue* const parameters); virtual ~MoveAndClickCommand(); - virtual bool Action(const gfx::Point& location, Response* const response); + virtual Error* Action(const gfx::Point& location); private: DISALLOW_COPY_AND_ASSIGN(MoveAndClickCommand); @@ -60,7 +66,7 @@ class HoverCommand : public ElementMouseCommand { const DictionaryValue* const parameters); virtual ~HoverCommand(); - virtual bool Action(const gfx::Point& location, Response* const response); + virtual Error* Action(const gfx::Point& location); private: DISALLOW_COPY_AND_ASSIGN(HoverCommand); @@ -76,7 +82,7 @@ class DragCommand : public ElementMouseCommand { virtual ~DragCommand(); virtual bool Init(Response* const response); - virtual bool Action(const gfx::Point& location, Response* const response); + virtual Error* Action(const gfx::Point& location); private: int drag_x_, drag_y_; |
