Skip to content

Commit 965d236

Browse files
author
Mykola Tryshnivskyy
committed
Merge branch 'WD_1.X_dev' of https://portal-ua.globallogic.com/git/wd into WD_1.X_dev
2 parents 4cc2d6c + da2e159 commit 965d236

24 files changed

+161
-11
lines changed

inc/extension_qt/graphics_web_view_executor.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ class GraphicsWebViewCmdExecutorCreator : public ViewCmdExecutorCreator {
2626

2727
virtual ViewCmdExecutor* CreateExecutor(Session* session, ViewId viewId) const;
2828
virtual bool CanHandleView(Session* session, ViewId viewId, ViewType* viewType = NULL) const;
29+
virtual std::string GetViewTypeName() const;
30+
2931
private:
3032

3133
DISALLOW_COPY_AND_ASSIGN(GraphicsWebViewCmdExecutorCreator);

inc/extension_qt/q_session_lifecycle_actions.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ class QSessionLifeCycleActions : public SessionLifeCycleActions {
2727

2828
Error* ParseAndApplyProxySettings(const base::DictionaryValue* proxy_dict);
2929

30+
bool AddActualQtVersion();
31+
Error* CheckRequiredQtVersion(const base::DictionaryValue *capabilities_dict);
32+
3033
DISALLOW_COPY_AND_ASSIGN(QSessionLifeCycleActions);
3134
};
3235

inc/extension_qt/qml_view_executor.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ class QQmlViewCmdExecutorCreator : public ViewCmdExecutorCreator {
1919

2020
virtual ViewCmdExecutor* CreateExecutor(Session* session, ViewId viewId) const;
2121
virtual bool CanHandleView(Session* session, ViewId viewId, ViewType* viewType = NULL) const;
22+
virtual std::string GetViewTypeName() const;
23+
2224
private:
2325

2426
DISALLOW_COPY_AND_ASSIGN(QQmlViewCmdExecutorCreator);

inc/extension_qt/qml_web_view_executor.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ class QmlWebViewCmdExecutorCreator : public ViewCmdExecutorCreator {
2727

2828
virtual ViewCmdExecutor* CreateExecutor(Session* session, ViewId viewId) const;
2929
virtual bool CanHandleView(Session* session, ViewId viewId, ViewType* viewType = NULL) const;
30+
virtual std::string GetViewTypeName() const;
31+
3032
private:
3133

3234
DISALLOW_COPY_AND_ASSIGN(QmlWebViewCmdExecutorCreator);

inc/extension_qt/quick2_view_executor.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ class Quick2ViewCmdExecutorCreator : public ViewCmdExecutorCreator {
1919

2020
virtual ViewCmdExecutor* CreateExecutor(Session* session, ViewId viewId) const;
2121
virtual bool CanHandleView(Session* session, ViewId viewId, ViewType* viewType = NULL) const;
22+
virtual std::string GetViewTypeName() const;
23+
2224
private:
2325

2426
DISALLOW_COPY_AND_ASSIGN(Quick2ViewCmdExecutorCreator);

inc/extension_qt/web_view_executor.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ class QWebViewCmdExecutorCreator : public ViewCmdExecutorCreator {
2828

2929
virtual ViewCmdExecutor* CreateExecutor(Session* session, ViewId viewId) const;
3030
virtual bool CanHandleView(Session* session, ViewId viewId, ViewType* viewType = NULL) const;
31+
virtual std::string GetViewTypeName() const;
32+
3133
private:
3234

3335
DISALLOW_COPY_AND_ASSIGN(QWebViewCmdExecutorCreator);

inc/extension_qt/widget_view_executor.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ class QWidgetViewCmdExecutorCreator : public ViewCmdExecutorCreator {
1414

1515
virtual ViewCmdExecutor* CreateExecutor(Session* session, ViewId viewId) const;
1616
virtual bool CanHandleView(Session* session, ViewId viewId, ViewType* viewType = NULL) const;
17+
virtual std::string GetViewTypeName() const;
18+
1719
private:
1820

1921
DISALLOW_COPY_AND_ASSIGN(QWidgetViewCmdExecutorCreator);

inc/webdriver_capabilities_parser.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ struct Capabilities {
6262
static const char kLoadAsync[];
6363
static const char kBrowserStartWindow[];
6464
static const char kBrowserClass[];
65+
static const char kHybrid[];
6566
/// desired size, as a string (e.g. - "600, 600") for start window
6667
static const char kWindowSize[];
6768
/// desired position, as a string (e.g. - "80, 60") for start window

inc/webdriver_session.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ session's create or session's terminate.
5252
#include "base/scoped_temp_dir.h"
5353
#include "base/string16.h"
5454
#include "base/threading/thread.h"
55+
#include "base/values.h"
5556
#include "frame_path.h"
5657
#include "webdriver_basic_types.h"
5758
#include "webdriver_view_id.h"
@@ -217,6 +218,7 @@ class Session {
217218
bool CheckRequiredCapabilities(const base::DictionaryValue* capabilities_dict);
218219
bool CheckRequiredBrowser(const base::DictionaryValue* capabilities_dict);
219220
bool CheckRequiredPlatform(const base::DictionaryValue* capabilities_dict);
221+
bool CheckRequiredViewType(const base::DictionaryValue* capabilities_dict);
220222
bool CheckRequiredCapabilityBoolean(const base::DictionaryValue* capabilities_dict, const std::string& cap_name);
221223

222224
void RunClosureOnSessionThread(

inc/webdriver_view_executor.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ class ViewCmdExecutorCreator {
202202
/// @param[out] viewType returned type of view
203203
/// @return true - if there is executor for such view
204204
virtual bool CanHandleView(Session* session, ViewId viewId, ViewType* viewType = NULL) const = 0;
205+
206+
/// @return supported view type for current executor
207+
virtual std::string GetViewTypeName() const = 0;
208+
205209
private:
206210

207211
DISALLOW_COPY_AND_ASSIGN(ViewCmdExecutorCreator);
@@ -241,10 +245,15 @@ class ViewCmdExecutorFactory
241245
/// @param creator pointer to custom creator. No need to delete object
242246
void AddViewCmdExecutorCreator(ViewCmdExecutorCreator* creator);
243247

248+
typedef std::vector<std::string> SupportedViewTypesList;
249+
/// @return pointer to vector supported view types
250+
const SupportedViewTypesList& getSupportedViewTypesList() const;
251+
244252
private:
245253
typedef ViewCmdExecutorCreator* ViewCmdExecutorCreatorPtr;
246254
typedef std::vector<ViewCmdExecutorCreatorPtr> CreatorsList;
247255
CreatorsList creators_;
256+
SupportedViewTypesList typeslist_;
248257

249258
ViewCmdExecutorFactory();
250259
~ViewCmdExecutorFactory(){}

0 commit comments

Comments
 (0)