Commit 3cc12621 authored by chrisgao@chromium.org's avatar chrisgao@chromium.org

[chromedriver] Fix nested frame issue for command getElementLocationOnceScrolledIntoView.

Also enable two passed java tests.

BUG=
NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/13870016

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195036 0039d316-1c4b-4281-b951-d872f2087c98
parent 029b28e5
...@@ -371,13 +371,13 @@ Status ExecuteGetElementLocationOnceScrolledIntoView( ...@@ -371,13 +371,13 @@ Status ExecuteGetElementLocationOnceScrolledIntoView(
const std::string& element_id, const std::string& element_id,
const base::DictionaryValue& params, const base::DictionaryValue& params,
scoped_ptr<base::Value>* value) { scoped_ptr<base::Value>* value) {
base::ListValue args; WebPoint location;
args.Append(CreateElement(element_id)); Status status = ScrollElementIntoView(
return web_view->CallFunction( session, web_view, element_id, &location);
session->GetCurrentFrameId(), if (status.IsError())
webdriver::atoms::asString(webdriver::atoms::GET_LOCATION_IN_VIEW), return status;
args, value->reset(CreateValueFrom(location));
value); return Status(kOk);
} }
Status ExecuteGetElementSize( Status ExecuteGetElementSize(
......
...@@ -34,13 +34,6 @@ bool ParseFromValue(base::Value* value, WebPoint* point) { ...@@ -34,13 +34,6 @@ bool ParseFromValue(base::Value* value, WebPoint* point) {
return true; return true;
} }
base::Value* CreateValueFrom(const WebPoint& point) {
base::DictionaryValue* dict = new base::DictionaryValue();
dict->SetInteger("x", point.x);
dict->SetInteger("y", point.y);
return dict;
}
bool ParseFromValue(base::Value* value, WebSize* size) { bool ParseFromValue(base::Value* value, WebSize* size) {
base::DictionaryValue* dict_value; base::DictionaryValue* dict_value;
if (!value->GetAsDictionary(&dict_value)) if (!value->GetAsDictionary(&dict_value))
...@@ -219,6 +212,13 @@ base::DictionaryValue* CreateElement(const std::string& element_id) { ...@@ -219,6 +212,13 @@ base::DictionaryValue* CreateElement(const std::string& element_id) {
return element; return element;
} }
base::Value* CreateValueFrom(const WebPoint& point) {
base::DictionaryValue* dict = new base::DictionaryValue();
dict->SetInteger("x", point.x);
dict->SetInteger("y", point.y);
return dict;
}
Status FindElement( Status FindElement(
int interval_ms, int interval_ms,
bool only_one, bool only_one,
......
...@@ -22,6 +22,8 @@ class WebView; ...@@ -22,6 +22,8 @@ class WebView;
base::DictionaryValue* CreateElement(const std::string& element_id); base::DictionaryValue* CreateElement(const std::string& element_id);
base::Value* CreateValueFrom(const WebPoint& point);
// |root_element_id| could be null when no root element is given. // |root_element_id| could be null when no root element is given.
Status FindElement( Status FindElement(
int interval_ms, int interval_ms,
......
...@@ -32,8 +32,6 @@ _REVISION_NEGATIVE_FILTER['HEAD'] = [ ...@@ -32,8 +32,6 @@ _REVISION_NEGATIVE_FILTER['HEAD'] = [
'ClickTest.testCanClickOnALinkThatContainsEmbeddedBlockElements', 'ClickTest.testCanClickOnALinkThatContainsEmbeddedBlockElements',
'CombinedInputActionsTest.testClickingOnFormElements', 'CombinedInputActionsTest.testClickingOnFormElements',
'CombinedInputActionsTest.testHoldingDownShiftKeyWhileClicking', 'CombinedInputActionsTest.testHoldingDownShiftKeyWhileClicking',
'CoordinatesTest.testShouldGetCoordinatesInViewPortOfAnElementInAFrame',
'CoordinatesTest.testShouldGetCoordinatesInViewPortOfAnElementInANestedFrame',
'CoordinatesTest.testShouldScrollPageAndGetCoordinatesOfAnElementThatIsOutOfViewPort', 'CoordinatesTest.testShouldScrollPageAndGetCoordinatesOfAnElementThatIsOutOfViewPort',
'CorrectEventFiringTest.testShouldEmitOnClickEventsWhenSelectingElements', 'CorrectEventFiringTest.testShouldEmitOnClickEventsWhenSelectingElements',
'CorrectEventFiringTest.testShouldFireEventsInTheRightOrder', 'CorrectEventFiringTest.testShouldFireEventsInTheRightOrder',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment