blob: 1408f98d688acedbde5e67f2a8229e3c562704a1 [file] [log] [blame]
tfarina@chromium.org8deba6ca2014-05-26 16:37:031// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
jochen73e711c2015-06-03 10:01:465#ifndef COMPONENTS_TEST_RUNNER_WEB_TEST_RUNNER_H_
6#define COMPONENTS_TEST_RUNNER_WEB_TEST_RUNNER_H_
tfarina@chromium.org8deba6ca2014-05-26 16:37:037
8#include <vector>
9
10namespace blink {
mlamouri007f9d72015-02-27 16:27:2511class WebContentSettingsClient;
tfarina@chromium.org8deba6ca2014-05-26 16:37:0312}
13
14namespace content {
15
16class WebTestRunner {
17 public:
mlamouri007f9d72015-02-27 16:27:2518 // Returns a mock WebContentSettings that is used for layout tests. An
tfarina@chromium.org8deba6ca2014-05-26 16:37:0319 // embedder should use this for all WebViews it creates.
mlamouri007f9d72015-02-27 16:27:2520 virtual blink::WebContentSettingsClient* GetWebContentSettings() const = 0;
tfarina@chromium.org8deba6ca2014-05-26 16:37:0321
abhishek.a21ca9b5602014-09-19 07:33:3322 // After WebTestDelegate::TestFinished was invoked, the following methods
tfarina@chromium.org8deba6ca2014-05-26 16:37:0323 // can be used to determine what kind of dump the main WebTestProxy can
24 // provide.
25
26 // If true, WebTestDelegate::audioData returns an audio dump and no text
27 // or pixel results are available.
28 virtual bool ShouldDumpAsAudio() const = 0;
29 virtual void GetAudioData(std::vector<unsigned char>* buffer_view) const = 0;
30
31 // Returns true if the call to WebTestProxy::captureTree will invoke
32 // WebTestDelegate::captureHistoryForWindow.
33 virtual bool ShouldDumpBackForwardList() const = 0;
34
35 // Returns true if WebTestProxy::capturePixels should be invoked after
36 // capturing text results.
37 virtual bool ShouldGeneratePixelResults() = 0;
38};
39
40} // namespace content
41
jochen73e711c2015-06-03 10:01:4642#endif // COMPONENTS_TEST_RUNNER_WEB_TEST_RUNNER_H_