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

Side by Side Diff: trunk/src/content/shell/browser/webkit_test_controller.cc

Issue 101113004: Revert 239759 "The comment in base64.h implies that base::Base64..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/shell/browser/webkit_test_controller.h" 5 #include "content/shell/browser/webkit_test_controller.h"
6 6
7 #include <iostream> 7 #include <iostream>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 *output_ << message << "\n"; 163 *output_ << message << "\n";
164 PrintTextFooter(); 164 PrintTextFooter();
165 PrintImageFooter(); 165 PrintImageFooter();
166 } 166 }
167 167
168 void WebKitTestResultPrinter::PrintEncodedBinaryData( 168 void WebKitTestResultPrinter::PrintEncodedBinaryData(
169 const std::vector<unsigned char>& data) { 169 const std::vector<unsigned char>& data) {
170 *output_ << "Content-Transfer-Encoding: base64\n"; 170 *output_ << "Content-Transfer-Encoding: base64\n";
171 171
172 std::string data_base64; 172 std::string data_base64;
173 base::Base64Encode( 173 const bool success = base::Base64Encode(
174 base::StringPiece(reinterpret_cast<const char*>(&data[0]), data.size()), 174 base::StringPiece(reinterpret_cast<const char*>(&data[0]), data.size()),
175 &data_base64); 175 &data_base64);
176 DCHECK(success);
176 177
177 *output_ << "Content-Length: " << data_base64.length() << "\n"; 178 *output_ << "Content-Length: " << data_base64.length() << "\n";
178 output_->write(data_base64.c_str(), data_base64.length()); 179 output_->write(data_base64.c_str(), data_base64.length());
179 } 180 }
180 181
181 void WebKitTestResultPrinter::CloseStderr() { 182 void WebKitTestResultPrinter::CloseStderr() {
182 if (state_ != AFTER_TEST) 183 if (state_ != AFTER_TEST)
183 return; 184 return;
184 if (!capture_text_only_) { 185 if (!capture_text_only_) {
185 *error_ << "#EOF\n"; 186 *error_ << "#EOF\n";
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 } 647 }
647 base::MessageLoop::current()->RunUntilIdle(); 648 base::MessageLoop::current()->RunUntilIdle();
648 } 649 }
649 650
650 void WebKitTestController::OnResetDone() { 651 void WebKitTestController::OnResetDone() {
651 base::MessageLoop::current()->PostTask(FROM_HERE, 652 base::MessageLoop::current()->PostTask(FROM_HERE,
652 base::MessageLoop::QuitClosure()); 653 base::MessageLoop::QuitClosure());
653 } 654 }
654 655
655 } // namespace content 656 } // namespace content
OLDNEW
« no previous file with comments | « trunk/src/content/common/page_state_serialization_unittest.cc ('k') | trunk/src/content/shell/renderer/webkit_test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698