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

Side by Side Diff: sky/tools/tester/test_runner.cc

Issue 826343003: Minor improvements to reftests. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Move the check to TestRunner::OnTestComplete so we only assert if we're actually running a pixel/re… Created 5 years, 11 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
« no previous file with comments | « sky/tests/resources/run-after-display.sky ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "sky/tools/tester/test_runner.h" 5 #include "sky/tools/tester/test_runner.h"
6 6
7 #include <iostream> 7 #include <iostream>
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "mojo/public/cpp/application/connect.h" 9 #include "mojo/public/cpp/application/connect.h"
10 #include "mojo/public/cpp/application/service_provider_impl.h" 10 #include "mojo/public/cpp/application/service_provider_impl.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 std::cout << "Content-Type: text/plain\n"; 48 std::cout << "Content-Type: text/plain\n";
49 std::cout << test_result << "\n"; 49 std::cout << test_result << "\n";
50 std::cout << "#EOF\n"; 50 std::cout << "#EOF\n";
51 51
52 // TODO(ojan): Don't generate the pixels if enable_pixel_dumping_ is false. 52 // TODO(ojan): Don't generate the pixels if enable_pixel_dumping_ is false.
53 if (enable_pixel_dumping_) { 53 if (enable_pixel_dumping_) {
54 // TODO(ojan): Add real hashes here once we want to do pixel tests. 54 // TODO(ojan): Add real hashes here once we want to do pixel tests.
55 std::cout << "\nActualHash: FAKEHASHSTUB\n"; 55 std::cout << "\nActualHash: FAKEHASHSTUB\n";
56 std::cout << "Content-Type: image/png\n"; 56 std::cout << "Content-Type: image/png\n";
57 std::cout << "Content-Length: " << pixels.size() << "\n"; 57 std::cout << "Content-Length: " << pixels.size() << "\n";
58 CHECK(pixels.size()) << "Could not dump pixels. Did you call notifyTestCompl ete before the first paint?";
58 std::cout.write( 59 std::cout.write(
59 reinterpret_cast<const char*>(&pixels[0]), pixels.size()); 60 reinterpret_cast<const char*>(&pixels[0]), pixels.size());
60 } 61 }
61 62
62 std::cout << "#EOF\n"; 63 std::cout << "#EOF\n";
63 std::cout.flush(); 64 std::cout.flush();
64 std::cerr << "#EOF\n"; 65 std::cerr << "#EOF\n";
65 std::cerr.flush(); 66 std::cerr.flush();
66 67
67 client_->OnTestComplete(); 68 client_->OnTestComplete();
68 } 69 }
69 70
70 } // namespace tester 71 } // namespace tester
71 } // namespace sky 72 } // namespace sky
OLDNEW
« no previous file with comments | « sky/tests/resources/run-after-display.sky ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698