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

Side by Side Diff: chrome/test/webdriver/commands/screenshot_command.cc

Issue 7649006: more changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix another typo Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/test/webdriver/commands/screenshot_command.h" 5 #include "chrome/test/webdriver/commands/screenshot_command.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 23 matching lines...) Expand all
34 } 34 }
35 35
36 // Convert the raw binary data to base 64 encoding for webdriver. 36 // Convert the raw binary data to base 64 encoding for webdriver.
37 std::string base64_screenshot; 37 std::string base64_screenshot;
38 if (!base::Base64Encode(raw_bytes, &base64_screenshot)) { 38 if (!base::Base64Encode(raw_bytes, &base64_screenshot)) {
39 response->SetError(new Error( 39 response->SetError(new Error(
40 kUnknownError, "Encoding the PNG to base64 format failed")); 40 kUnknownError, "Encoding the PNG to base64 format failed"));
41 return; 41 return;
42 } 42 }
43 43
44 response->SetValue(new StringValue(base64_screenshot)); 44 response->SetValue(base::StringValue::New(base64_screenshot));
45 } 45 }
46 46
47 } // namespace webdriver 47 } // namespace webdriver
OLDNEW
« no previous file with comments | « chrome/test/webdriver/commands/create_session.cc ('k') | chrome/test/webdriver/commands/session_with_id.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698