Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Issue 6544003: The command handler for /session/:sessionId/execute (execute_script) was... (Closed)

Created:
9 years, 10 months ago by Jason Leyba
Modified:
9 years, 7 months ago
Reviewers:
kkania
CC:
chromium-reviews, Paweł Hajdan Jr.
Visibility:
Public.

Description

The command handler for /session/:sessionId/execute (execute_script) was implemented incorrectly: the "args" JSON parameter should be a ListValue, not a StringValue. Also, the "args" parameter is not optional; if no "args" are provided in the request, an error should be returned (the handler was defaulting to an empty list).

Patch Set 1 #

Total comments: 4

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : Reverting some changes to WEBDRIVER_TESTS that belong in another CL #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -70 lines) Patch
M chrome/test/webdriver/WEBDRIVER_TESTS View 1 2 3 1 chunk +0 lines, -11 lines 0 comments Download
M chrome/test/webdriver/commands/execute_command.h View 1 2 3 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/test/webdriver/commands/execute_command.cc View 1 2 3 2 chunks +16 lines, -53 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Jason Leyba
9 years, 10 months ago (2011-02-17 23:26:30 UTC) #1
kkania
LGTM http://codereview.chromium.org/6544003/diff/1/chrome/test/webdriver/commands/execute_command.cc File chrome/test/webdriver/commands/execute_command.cc (right): http://codereview.chromium.org/6544003/diff/1/chrome/test/webdriver/commands/execute_command.cc#newcode9 chrome/test/webdriver/commands/execute_command.cc:9: #include "base/values.h" since you're fixing up headers, how ...
9 years, 10 months ago (2011-02-17 23:37:47 UTC) #2
Jason Leyba
9 years, 10 months ago (2011-02-18 00:08:00 UTC) #3
http://codereview.chromium.org/6544003/diff/1/chrome/test/webdriver/commands/...
File chrome/test/webdriver/commands/execute_command.cc (right):

http://codereview.chromium.org/6544003/diff/1/chrome/test/webdriver/commands/...
chrome/test/webdriver/commands/execute_command.cc:9: #include "base/values.h"
On 2011/02/17 23:37:47, kkania wrote:
> since you're fixing up headers, how about add one for response, error_codes,
and
> session?

Done.

http://codereview.chromium.org/6544003/diff/1/chrome/test/webdriver/commands/...
chrome/test/webdriver/commands/execute_command.cc:29: if
(!GetStringParameter(kScript, &script_)) {
On 2011/02/17 23:37:47, kkania wrote:
> Can you move the parsing of the JSON params out of Init and into ExecutePost?
> 
> This would allow you to get rid of the member variables and the custom init

Done.

Powered by Google App Engine
This is Rietveld 408576698