X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fchrome%2Ftest%2Fchromedriver%2Fsession_commands.cc;h=8f519c9ca3706b61aa19d7c07bbc3ab189d1d568;hb=4a1a0bdd01eef90b0826a0e761d3379d3715c10f;hp=864ffd7fa53459f950b43927aced3df20eac65ca;hpb=b1be5ca53587d23e7aeb77b26861fdc0a181ffd8;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/chrome/test/chromedriver/session_commands.cc b/src/chrome/test/chromedriver/session_commands.cc index 864ffd7..8f519c9 100644 --- a/src/chrome/test/chromedriver/session_commands.cc +++ b/src/chrome/test/chromedriver/session_commands.cc @@ -28,6 +28,7 @@ #include "chrome/test/chromedriver/chrome/version.h" #include "chrome/test/chromedriver/chrome/web_view.h" #include "chrome/test/chromedriver/chrome_launcher.h" +#include "chrome/test/chromedriver/command_listener.h" #include "chrome/test/chromedriver/logging.h" #include "chrome/test/chromedriver/net/url_request_context_getter.h" #include "chrome/test/chromedriver/session.h" @@ -124,13 +125,19 @@ Status InitSessionHelper( // Create Log's and DevToolsEventListener's for ones that are DevTools-based. // Session will own the Log's, Chrome will own the listeners. + // Also create |CommandListener|s for the appropriate logs. ScopedVector devtools_event_listeners; + ScopedVector command_listeners; status = CreateLogs(capabilities, &session->devtools_logs, - &devtools_event_listeners); + &devtools_event_listeners, + &command_listeners); if (status.IsError()) return status; + // |session| will own the |CommandListener|s. + session->command_listeners.swap(command_listeners); + status = LaunchChrome(bound_params.context_getter.get(), bound_params.socket_factory, bound_params.device_manager, @@ -477,7 +484,8 @@ Status ExecuteSetWindowPosition( Session* session, const base::DictionaryValue& params, scoped_ptr* value) { - double x, y; + double x = 0; + double y = 0; if (!params.GetDouble("x", &x) || !params.GetDouble("y", &y)) return Status(kUnknownError, "missing or invalid 'x' or 'y'"); @@ -528,7 +536,8 @@ Status ExecuteSetWindowSize( Session* session, const base::DictionaryValue& params, scoped_ptr* value) { - double width, height; + double width = 0; + double height = 0; if (!params.GetDouble("width", &width) || !params.GetDouble("height", &height)) return Status(kUnknownError, "missing or invalid 'width' or 'height'");