diff options
author | kkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-01 03:22:41 +0000 |
---|---|---|
committer | kkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-01 03:22:41 +0000 |
commit | 3403e9496c3f7a57fbc27c4964d0d02c19b082f0 (patch) | |
tree | bc2e2b5df76b9427e0a29807acbc0200e8c7844d /chrome/test/chromedriver/command_executor_impl_unittest.cc | |
parent | eaa72edf0e5deeb40ba8b23d435e9112aba33aa0 (diff) | |
download | chromium_src-3403e9496c3f7a57fbc27c4964d0d02c19b082f0.zip chromium_src-3403e9496c3f7a57fbc27c4964d0d02c19b082f0.tar.gz chromium_src-3403e9496c3f7a57fbc27c4964d0d02c19b082f0.tar.bz2 |
[chromedriver] Rework version check and populate session capabilities.
Before, chromedriver was checking the version by connecting to the first
renderer and parsing the user agent via js. It is much simpler to just check
via the remote debugger server handler /json/version.
Move the capability info to the Session struct, and include the Chrome and
ChromeDriver version for most Status errors.
BUG=174905
Review URL: https://chromiumcodereview.appspot.com/12321118
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185435 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/chromedriver/command_executor_impl_unittest.cc')
-rw-r--r-- | chrome/test/chromedriver/command_executor_impl_unittest.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/test/chromedriver/command_executor_impl_unittest.cc b/chrome/test/chromedriver/command_executor_impl_unittest.cc index 61c7ffb..af37070 100644 --- a/chrome/test/chromedriver/command_executor_impl_unittest.cc +++ b/chrome/test/chromedriver/command_executor_impl_unittest.cc @@ -25,7 +25,7 @@ TEST(CommandExecutorImplTest, UnknownCommand) { ASSERT_TRUE(value->GetAsDictionary(&error)); std::string error_msg; ASSERT_TRUE(error->GetString("message", &error_msg)); - ASSERT_STREQ("unknown command: noSuchCommand", error_msg.c_str()); + ASSERT_NE(std::string::npos, error_msg.find("noSuchCommand")); ASSERT_STREQ("session", session_id.c_str()); } @@ -127,5 +127,5 @@ TEST(CommandExecutorImplTest, CommandThatReturnsError) { ASSERT_TRUE(value->GetAsDictionary(&error)); std::string message; ASSERT_TRUE(error->GetString("message", &message)); - ASSERT_STREQ(Status(kUnknownError).message().c_str(), message.c_str()); + ASSERT_NE(std::string::npos, message.find("unknown error")); } |