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

Unified Diff: content/shell/webkit_test_runner_host.h

Issue 10941011: Rewrite layout_browsertests to use content_shell --dump-render-tree to execute layout tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: content/shell/webkit_test_runner_host.h
diff --git a/content/shell/webkit_test_runner_host.h b/content/shell/webkit_test_runner_host.h
index 91f31ae1c2f6506d926d38b5c33a2e3c54a0051b..792f0ee82d2e4b9b716a91c6e8ae9dc7983bd360 100644
--- a/content/shell/webkit_test_runner_host.h
+++ b/content/shell/webkit_test_runner_host.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_SHELL_WEBKIT_TEST_RUNNER_HOST_H_
#define CONTENT_SHELL_WEBKIT_TEST_RUNNER_HOST_H_
+#include <ostream>
#include <string>
#include "base/cancelable_callback.h"
@@ -20,13 +21,16 @@ class Shell;
class WebKitTestResultPrinter {
public:
- WebKitTestResultPrinter();
+ WebKitTestResultPrinter(std::ostream* output, std::ostream* error);
~WebKitTestResultPrinter();
void reset() {
state_ = BEFORE_TEST;
}
bool in_text_block() const { return state_ == IN_TEXT_BLOCK; }
+ void set_capture_text_only(bool capture_text_only) {
+ capture_text_only_ = capture_text_only;
+ }
void PrintTextHeader();
void PrintTextBlock(const std::string& block);
@@ -48,6 +52,10 @@ class WebKitTestResultPrinter {
AFTER_TEST
};
State state_;
+ bool capture_text_only_;
+
+ std::ostream* output_;
+ std::ostream* error_;
DISALLOW_COPY_AND_ASSIGN(WebKitTestResultPrinter);
};
@@ -69,7 +77,10 @@ class WebKitTestController : public base::NonThreadSafe,
void RendererUnresponsive();
- WebKitTestResultPrinter& printer() { return printer_; }
+ WebKitTestResultPrinter* printer() { return printer_.get(); }
+ void set_printer(WebKitTestResultPrinter* printer) {
+ printer_.reset(printer);
+ }
// Interface for WebKitTestRunnerHost.
void NotifyDone();
@@ -111,7 +122,7 @@ class WebKitTestController : public base::NonThreadSafe,
void OnImageDump(const std::string& actual_pixel_hash, const SkBitmap& image);
void OnTextDump(const std::string& dump);
- WebKitTestResultPrinter printer_;
+ scoped_ptr<WebKitTestResultPrinter> printer_;
Shell* main_window_;

Powered by Google App Engine
This is Rietveld 408576698