Move test runner to a component
BUG=478250
[email protected],[email protected],[email protected]
Review URL: https://codereview.chromium.org/1167703002
Cr-Commit-Position: refs/heads/master@{#332583}
diff --git a/components/test_runner/web_test_runner.h b/components/test_runner/web_test_runner.h
new file mode 100644
index 0000000..1408f98
--- /dev/null
+++ b/components/test_runner/web_test_runner.h
@@ -0,0 +1,42 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_TEST_RUNNER_WEB_TEST_RUNNER_H_
+#define COMPONENTS_TEST_RUNNER_WEB_TEST_RUNNER_H_
+
+#include <vector>
+
+namespace blink {
+class WebContentSettingsClient;
+}
+
+namespace content {
+
+class WebTestRunner {
+ public:
+ // Returns a mock WebContentSettings that is used for layout tests. An
+ // embedder should use this for all WebViews it creates.
+ virtual blink::WebContentSettingsClient* GetWebContentSettings() const = 0;
+
+ // After WebTestDelegate::TestFinished was invoked, the following methods
+ // can be used to determine what kind of dump the main WebTestProxy can
+ // provide.
+
+ // If true, WebTestDelegate::audioData returns an audio dump and no text
+ // or pixel results are available.
+ virtual bool ShouldDumpAsAudio() const = 0;
+ virtual void GetAudioData(std::vector<unsigned char>* buffer_view) const = 0;
+
+ // Returns true if the call to WebTestProxy::captureTree will invoke
+ // WebTestDelegate::captureHistoryForWindow.
+ virtual bool ShouldDumpBackForwardList() const = 0;
+
+ // Returns true if WebTestProxy::capturePixels should be invoked after
+ // capturing text results.
+ virtual bool ShouldGeneratePixelResults() = 0;
+};
+
+} // namespace content
+
+#endif // COMPONENTS_TEST_RUNNER_WEB_TEST_RUNNER_H_