Skip to content

Commit ce3bd4e

Browse files
author
Mykola Tryshnivskyy
committed
Fixed warnings in webdriver_automation
1 parent af6cc44 commit ce3bd4e

File tree

3 files changed

+12
-18
lines changed

3 files changed

+12
-18
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ report/*
2020
/Makefile
2121
/WebDriver.target.mk
2222
/WebDriverTest.target.mk
23+
wd.*
24+
*.log

src/chrome/test/webdriver/webdriver_automation.cc

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ Automation::BrowserOptions::~BrowserOptions() {}
9292
Automation::Automation(const Logger& logger)
9393
: logger_(logger),
9494
build_no_(0),
95-
isLoading(false)
95+
isLoading(false),
96+
sessionId(0)
9697
{
9798
}
9899

@@ -546,7 +547,6 @@ void Automation::SendNativeElementWebKeyEvent(const WebViewId &view_id, const El
546547
return;
547548
}
548549

549-
QWidget *view = view_id.GetView();
550550
QWidget *pWidget = GetNativeElement(view_id, element);
551551

552552
if (NULL == pWidget)
@@ -1139,7 +1139,6 @@ void Automation::GetNativeElementSize(const WebViewId& view_id,
11391139
return;
11401140
}
11411141

1142-
QWidget *view = view_id.GetView();
11431142
QWidget *pWidget = GetNativeElement(view_id, element);
11441143

11451144
if (NULL == pWidget)
@@ -1233,7 +1232,6 @@ void Automation::GetNativeElementProperty(const WebViewId& view_id,
12331232
return;
12341233
}
12351234

1236-
QWidget *view = view_id.GetView();
12371235
QWidget *pWidget = GetNativeElement(view_id, element);
12381236

12391237
if (NULL == pWidget)
@@ -1299,7 +1297,6 @@ void Automation::NativeElementEquals(const WebViewId& view_id,
12991297
return;
13001298
}
13011299

1302-
QWidget *view = view_id.GetView();
13031300
QWidget *pWidget1 = GetNativeElement(view_id, element1);
13041301
QWidget *pWidget2 = GetNativeElement(view_id, element2);
13051302

@@ -1385,7 +1382,6 @@ void Automation::ClearNativeElement(const WebViewId& view_id,
13851382
return;
13861383
}
13871384

1388-
QWidget *view = view_id.GetView();
13891385
QWidget *pWidget = GetNativeElement(view_id, element);
13901386

13911387
if (NULL == pWidget)
@@ -1450,7 +1446,6 @@ void Automation::IsNativeElementDisplayed(const WebViewId& view_id,
14501446
return;
14511447
}
14521448

1453-
QWidget *view = view_id.GetView();
14541449
QWidget *pWidget = GetNativeElement(view_id, element);
14551450

14561451
if (NULL == pWidget)
@@ -1474,7 +1469,6 @@ void Automation::IsNativeElementEnabled(const WebViewId& view_id,
14741469
return;
14751470
}
14761471

1477-
QWidget *view = view_id.GetView();
14781472
QWidget *pWidget = GetNativeElement(view_id, element);
14791473

14801474
if (NULL == pWidget)
@@ -1497,7 +1491,6 @@ void Automation::IsNativeElementSelected(const WebViewId& view_id,
14971491
return;
14981492
}
14991493

1500-
QWidget *view = view_id.GetView();
15011494
QWidget *pWidget = GetNativeElement(view_id, element);
15021495

15031496
if (NULL == pWidget)
@@ -1534,8 +1527,7 @@ void Automation::GetNativeElementText(const WebViewId &view_id,
15341527
return;
15351528
}
15361529

1537-
QWidget *view = view_id.GetView();
1538-
QWidget *pWidget = GetNativeElement(view_id, element);
1530+
QWidget *pWidget = GetNativeElement(view_id, element);
15391531

15401532
if (NULL == pWidget)
15411533
{
@@ -2009,11 +2001,11 @@ void Automation::OverrideGeolocation(const DictionaryValue* geolocation,
20092001
// }
20102002
}
20112003

2012-
AutomationProxy* Automation::automation() const
2013-
{
2014-
return NULL;
2015-
// return launcher_->automation();
2016-
}
2004+
//AutomationProxy* Automation::automation() const
2005+
//{
2006+
// return NULL;
2007+
// // return launcher_->automation();
2008+
//}
20172009

20182010
Error* Automation::DetermineBuildNumber()
20192011
{
@@ -2223,7 +2215,7 @@ QKeyEvent Automation::ConvertToQtKeyEvent(const WebKeyEvent &key_event)
22232215
Qt::KeyboardModifiers modifiers;
22242216
QString text;
22252217

2226-
if ((key_event.type == automation::kRawKeyDownType) || (key_event.type == automation::kRawKeyDownType))
2218+
if ((key_event.type == automation::kKeyDownType) || (key_event.type == automation::kRawKeyDownType))
22272219
type = QEvent::KeyPress;
22282220
else
22292221
type = QEvent::KeyRelease;

src/chrome/test/webdriver/webdriver_automation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ class Automation : public QObject {
396396

397397

398398
private:
399-
AutomationProxy* automation() const;
399+
// AutomationProxy* automation() const;
400400
QWebView* ConvertViewIdToPointer(const WebViewId& view_id);
401401
Error* DetermineBuildNumber();
402402
Error* CheckVersion(int min_required_build_no,

0 commit comments

Comments
 (0)