OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/webkit_test_runner_host.h" | 5 #include "content/shell/webkit_test_runner_host.h" |
6 | 6 |
7 #include <iostream> | 7 #include <iostream> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 error_->flush(); | 60 error_->flush(); |
61 } | 61 } |
62 state_ = IN_IMAGE_BLOCK; | 62 state_ = IN_IMAGE_BLOCK; |
63 } | 63 } |
64 | 64 |
65 void WebKitTestResultPrinter::PrintImageHeader( | 65 void WebKitTestResultPrinter::PrintImageHeader( |
66 const std::string& actual_hash, | 66 const std::string& actual_hash, |
67 const std::string& expected_hash) { | 67 const std::string& expected_hash) { |
68 if (state_ != IN_IMAGE_BLOCK || capture_text_only_) | 68 if (state_ != IN_IMAGE_BLOCK || capture_text_only_) |
69 return; | 69 return; |
70 *output_ << "\nActualHash: " << actual_hash << "%s\n"; | 70 *output_ << "\nActualHash: " << actual_hash << "\n"; |
71 if (!expected_hash.empty()) | 71 if (!expected_hash.empty()) |
72 *output_ << "\nExpectedHash: " << expected_hash << "%s\n"; | 72 *output_ << "\nExpectedHash: " << expected_hash << "\n"; |
73 } | 73 } |
74 | 74 |
75 void WebKitTestResultPrinter::PrintImageBlock( | 75 void WebKitTestResultPrinter::PrintImageBlock( |
76 const std::vector<unsigned char>& png_image) { | 76 const std::vector<unsigned char>& png_image) { |
77 if (state_ != IN_IMAGE_BLOCK || capture_text_only_) | 77 if (state_ != IN_IMAGE_BLOCK || capture_text_only_) |
78 return; | 78 return; |
79 *output_ << "Content-Type: image/png\n"; | 79 *output_ << "Content-Type: image/png\n"; |
80 *output_ << "Content-Length: " << png_image.size() << "\n"; | 80 *output_ << "Content-Length: " << png_image.size() << "\n"; |
81 output_->write( | 81 output_->write( |
82 reinterpret_cast<const char*>(&png_image[0]), png_image.size()); | 82 reinterpret_cast<const char*>(&png_image[0]), png_image.size()); |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 WebKitTestController::Get()->WaitUntilDone(); | 378 WebKitTestController::Get()->WaitUntilDone(); |
379 } | 379 } |
380 | 380 |
381 void WebKitTestRunnerHost::OnNotImplemented( | 381 void WebKitTestRunnerHost::OnNotImplemented( |
382 const std::string& object_name, | 382 const std::string& object_name, |
383 const std::string& property_name) { | 383 const std::string& property_name) { |
384 WebKitTestController::Get()->NotImplemented(object_name, property_name); | 384 WebKitTestController::Get()->NotImplemented(object_name, property_name); |
385 } | 385 } |
386 | 386 |
387 } // namespace content | 387 } // namespace content |
OLD | NEW |