diff options
author | jmikhail@google.com <jmikhail@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-29 19:29:37 +0000 |
---|---|---|
committer | jmikhail@google.com <jmikhail@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-29 19:29:37 +0000 |
commit | 98598afb40e9400e4693c43150dc29d14fedf511 (patch) | |
tree | fe6a37f1e5bad858d26288ee969a1bfe07c4b3a4 /chrome/test/webdriver/commands/create_session.cc | |
parent | d97538fa40c41f40e289d766383c22ed96e7cb43 (diff) | |
download | chromium_src-98598afb40e9400e4693c43150dc29d14fedf511.zip chromium_src-98598afb40e9400e4693c43150dc29d14fedf511.tar.gz chromium_src-98598afb40e9400e4693c43150dc29d14fedf511.tar.bz2 |
Send screenshots back to the client for debigging
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/5572001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79721 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/webdriver/commands/create_session.cc')
-rw-r--r-- | chrome/test/webdriver/commands/create_session.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/test/webdriver/commands/create_session.cc b/chrome/test/webdriver/commands/create_session.cc index b23158e..b377f90 100644 --- a/chrome/test/webdriver/commands/create_session.cc +++ b/chrome/test/webdriver/commands/create_session.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -37,6 +37,13 @@ void CreateSession::ExecutePost(Response* const response) { return; } + bool screenshot_on_error = false; + DictionaryValue* capabilities = NULL; + if (GetDictionaryParameter("desiredCapabilities", &capabilities)) { + capabilities->GetBoolean("takeScreenshotOnError", &screenshot_on_error); + session->set_screenshot_on_error(screenshot_on_error); + } + VLOG(1) << "Created session " << session->id(); std::ostringstream stream; stream << "http://" << session_manager->GetAddress() << "/session/" |