Skip to content

Commit 3e214c7

Browse files
committed
Merge branch 'WD_1.X_dev' of https://portal-ua.globallogic.com/git/wd into WD_1.X_dev
2 parents 110142a + 83eb363 commit 3e214c7

File tree

108 files changed

+45843
-5145
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+45843
-5145
lines changed

Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ HTML_HEADER =
186186
HTML_FOOTER =
187187
HTML_STYLESHEET =
188188
HTML_EXTRA_STYLESHEET =
189-
HTML_EXTRA_FILES =
189+
HTML_EXTRA_FILES = ./src/webdriver/whitelist.xsd
190190
HTML_COLORSTYLE_HUE = 220
191191
HTML_COLORSTYLE_SAT = 100
192192
HTML_COLORSTYLE_GAMMA = 80

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ else
2727
modes=$mode
2828
fi
2929

30-
OUT_STATIC_LIB_FILES="libchromium_base.a libWebDriver_core.a libWebDriver_extension_qt_base.a libWebDriver_extension_qt_web.a libWebDriver_extension_qt_quick.a"
31-
OUT_SHARED_LIB_FILES="libchromium_base.so libWebDriver_core.so libWebDriver_extension_qt_base.so libWebDriver_extension_qt_web.so libWebDriver_extension_qt_quick.so libWebDriver_noWebkit_android.so"
30+
OUT_STATIC_LIB_FILES="libchromium_base.a libWebDriver_core.a libWebDriver_extension_qt_base.a libWebDriver_extension_qt_web.a libWebDriver_extension_qt_quick.a libWebDriver_extension_qt_quick_web.a"
31+
OUT_SHARED_LIB_FILES="libchromium_base.so libWebDriver_core.so libWebDriver_extension_qt_base.so libWebDriver_extension_qt_web.so libWebDriver_extension_qt_quick.so libWebDriver_extension_qt_quick_web.so libWebDriver_noWebkit_android.so"
3232
OUT_BIN_FILES="WebDriver WebDriver_noWebkit WebDriver_noWebkit_sharedLibs"
3333
GYP=`which gyp`
3434

inc/commands/browser_connection_command.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
15
#ifndef BROWSER_CONNECTION_COMMAND_H
26
#define BROWSER_CONNECTION_COMMAND_H
37

inc/commands/element_commands.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,19 @@ class ElementTextCommand : public ElementCommand {
257257
DISALLOW_COPY_AND_ASSIGN(ElementTextCommand);
258258
};
259259

260+
class ElementScreenshotCommand : public ElementCommand {
261+
public:
262+
ElementScreenshotCommand(const std::vector<std::string>& path_segments,
263+
const base::DictionaryValue* parameters);
264+
virtual ~ElementScreenshotCommand();
265+
266+
virtual bool DoesGet() const OVERRIDE;
267+
virtual void ExecuteGet(Response* const response) OVERRIDE;
268+
269+
private:
270+
DISALLOW_COPY_AND_ASSIGN(ElementScreenshotCommand);
271+
};
272+
260273
} // namespace webdriver
261274

262275
#endif // WEBDRIVER_COMMANDS_WEBELEMENT_COMMANDS_H_

inc/commands/html5_location_commands.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
15
#ifndef WEBDRIVER_COMMANDS_HTML5_LOCATION_COMMANDS_H_
26
#define WEBDRIVER_COMMANDS_HTML5_LOCATION_COMMANDS_H_
37

inc/commands/orientation_command.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
15
#ifndef ORIENTATION_COMMAND_H
26
#define ORIENTATION_COMMAND_H
37

inc/commands/touch_commands.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,32 @@ class TouchFlickCommand : public TouchCommand {
139139
DISALLOW_COPY_AND_ASSIGN(TouchFlickCommand);
140140
};
141141

142+
/// Rotate element using pinch rotate fingers motion events.
143+
class TouchPinchRotateCommand : public TouchCommand {
144+
public:
145+
TouchPinchRotateCommand(const std::vector<std::string>& path_segments,
146+
const base::DictionaryValue* const parameters);
147+
virtual ~TouchPinchRotateCommand();
148+
149+
virtual void ExecutePost(Response* const response) OVERRIDE;
150+
151+
private:
152+
DISALLOW_COPY_AND_ASSIGN(TouchPinchRotateCommand);
153+
};
154+
155+
/// Rotate element using pinch zoom fingers motion events.
156+
class TouchPinchZoomCommand : public TouchCommand {
157+
public:
158+
TouchPinchZoomCommand(const std::vector<std::string>& path_segments,
159+
const base::DictionaryValue* const parameters);
160+
virtual ~TouchPinchZoomCommand();
161+
162+
virtual void ExecutePost(Response* const response) OVERRIDE;
163+
164+
private:
165+
DISALLOW_COPY_AND_ASSIGN(TouchPinchZoomCommand);
166+
};
167+
142168
} // namespace webdriver
143169

144170
#endif // TOUCH_COMMANDS_H

inc/extension_qt/graphics_web_view_executor.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class GraphicsWebViewCmdExecutor : public ViewCmdExecutor {
4747
virtual void SetBounds(const Rect& bounds, Error** error) NOT_SUPPORTED_IMPL;
4848
virtual void Maximize(Error** error) NOT_SUPPORTED_IMPL;
4949
virtual void GetScreenShot(std::string* png, Error** error);
50+
virtual void GetElementScreenShot(const ElementId& element, std::string* png, Error** error) NOT_SUPPORTED_IMPL;
5051
virtual void GoForward(Error** error);
5152
virtual void GoBack(Error** error);
5253
virtual void Reload(Error** error);
@@ -131,6 +132,8 @@ class GraphicsWebViewCmdExecutor : public ViewCmdExecutor {
131132
virtual void GetOrientation(std::string *orientation, Error **error);
132133
virtual void SetOnline(bool, Error** error);
133134
virtual void IsOnline(bool*, Error** error);
135+
virtual void TouchPinchZoom(const ElementId &element, const double &scale, Error **error) NOT_SUPPORTED_IMPL;
136+
virtual void TouchPinchRotate(const ElementId &element, const int &angle, Error **error) NOT_SUPPORTED_IMPL;
134137

135138
protected:
136139
QGraphicsWebView* getView(const ViewId& viewId, Error** error);

inc/extension_qt/qml_view_executor.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class QQmlViewCmdExecutor : public QViewCmdExecutor {
3838
virtual void Reload(Error** error) NOT_SUPPORTED_IMPL;
3939
virtual void GetSource(std::string* source, Error** error);
4040
virtual void SendKeys(const ElementId& element, const string16& keys, Error** error);
41+
virtual void GetElementScreenShot(const ElementId& element, std::string* png, Error** error);
4142
virtual void MouseDoubleClick(Error** error);
4243
virtual void MouseButtonUp(Error** error);
4344
virtual void MouseButtonDown(Error** error);
@@ -103,21 +104,20 @@ class QQmlViewCmdExecutor : public QViewCmdExecutor {
103104
virtual void GetMute(const ElementId& element, bool*, Error**error) NOT_SUPPORTED_IMPL;
104105
virtual void SetPlaybackSpeed(const ElementId& element, double, Error**error) NOT_SUPPORTED_IMPL;;
105106
virtual void GetPlaybackSpeed(const ElementId& element, double*, Error**error) NOT_SUPPORTED_IMPL;;
106-
virtual void VisualizerSource(std::string* source, Error** error) NOT_SUPPORTED_IMPL;
107+
virtual void VisualizerSource(std::string* source, Error** error);
107108
virtual void VisualizerShowPoint(Error** error) NOT_SUPPORTED_IMPL;
109+
virtual void TouchPinchZoom(const ElementId &element, const double &scale, Error** error) NOT_SUPPORTED_IMPL;
110+
virtual void TouchPinchRotate(const ElementId &element, const int &angle, Error** error) NOT_SUPPORTED_IMPL;
108111

109112
virtual void SetOnline(bool, Error** error) NOT_SUPPORTED_IMPL;
110113
virtual void IsOnline(bool*, Error** error) NOT_SUPPORTED_IMPL;
111114

112115
protected:
113116
QDeclarativeView* getView(const ViewId& viewId, Error** error);
114-
typedef QHash<QString, QDeclarativeItem*> XMLElementMap;
115117

116118
QDeclarativeItem* getElement(const ElementId &element, Error** error);
117119
bool FilterElement(const QDeclarativeItem* item, const std::string& locator, const std::string& query);
118120
void FindElementsByXpath(QDeclarativeItem* parent, const std::string &query, std::vector<ElementId>* elements, Error **error);
119-
void createUIXML(QDeclarativeItem *parent, QIODevice* buff, XMLElementMap& elementsMap, Error** error);
120-
void addItemToXML(QDeclarativeItem* parent, XMLElementMap& elementsMap, QXmlStreamWriter* writer);
121121

122122
private:
123123
DISALLOW_COPY_AND_ASSIGN(QQmlViewCmdExecutor);

inc/extension_qt/qml_web_view_executor.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class QmlWebViewCmdExecutor : public ViewCmdExecutor {
4848
virtual void SetBounds(const Rect& bounds, Error** error) NOT_SUPPORTED_IMPL;
4949
virtual void Maximize(Error** error) NOT_SUPPORTED_IMPL;
5050
virtual void GetScreenShot(std::string* png, Error** error);
51+
virtual void GetElementScreenShot(const ElementId& element, std::string* png, Error** error) NOT_SUPPORTED_IMPL;
5152
virtual void GoForward(Error** error);
5253
virtual void GoBack(Error** error);
5354
virtual void Reload(Error** error);
@@ -132,6 +133,8 @@ class QmlWebViewCmdExecutor : public ViewCmdExecutor {
132133
virtual void GetOrientation(std::string *orientation, Error **error);
133134
virtual void SetOnline(bool, Error** error);
134135
virtual void IsOnline(bool*, Error** error);
136+
virtual void TouchPinchZoom(const ElementId &element, const double &scale, Error** error) NOT_SUPPORTED_IMPL;
137+
virtual void TouchPinchRotate(const ElementId &element, const int &angle, Error** error) NOT_SUPPORTED_IMPL;
135138

136139
protected:
137140
QDeclarativeWebView* getView(const ViewId& viewId, Error** error);

0 commit comments

Comments
 (0)