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

Side by Side Diff: components/test_runner/web_test_runner.h

Issue 1589643003: OOPIF support for testRunner.dumpAsText and similar layout dumps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... Created 4 years, 10 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 | « components/test_runner/web_test_proxy.cc ('k') | content/shell/DEPS » ('j') | 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 #ifndef COMPONENTS_TEST_RUNNER_WEB_TEST_RUNNER_H_ 5 #ifndef COMPONENTS_TEST_RUNNER_WEB_TEST_RUNNER_H_
6 #define COMPONENTS_TEST_RUNNER_WEB_TEST_RUNNER_H_ 6 #define COMPONENTS_TEST_RUNNER_WEB_TEST_RUNNER_H_
7 7
8 #include <string>
8 #include <vector> 9 #include <vector>
9 10
11 #include "components/test_runner/layout_dump_flags.h"
12
10 namespace blink { 13 namespace blink {
11 class WebContentSettingsClient; 14 class WebContentSettingsClient;
12 } 15 }
13 16
14 namespace test_runner { 17 namespace test_runner {
15 18
16 class WebTestRunner { 19 class WebTestRunner {
17 public: 20 public:
18 // Returns a mock WebContentSettings that is used for layout tests. An 21 // Returns a mock WebContentSettings that is used for layout tests. An
19 // embedder should use this for all WebViews it creates. 22 // embedder should use this for all WebViews it creates.
20 virtual blink::WebContentSettingsClient* GetWebContentSettings() const = 0; 23 virtual blink::WebContentSettingsClient* GetWebContentSettings() const = 0;
21 24
22 // After WebTestDelegate::TestFinished was invoked, the following methods 25 // After WebTestDelegate::TestFinished was invoked, the following methods
23 // can be used to determine what kind of dump the main WebTestProxy can 26 // can be used to determine what kind of dump the main WebTestProxy can
24 // provide. 27 // provide.
25 28
26 // If true, WebTestDelegate::audioData returns an audio dump and no text 29 // If true, WebTestDelegate::audioData returns an audio dump and no text
27 // or pixel results are available. 30 // or pixel results are available.
28 virtual bool ShouldDumpAsAudio() const = 0; 31 virtual bool ShouldDumpAsAudio() const = 0;
29 virtual void GetAudioData(std::vector<unsigned char>* buffer_view) const = 0; 32 virtual void GetAudioData(std::vector<unsigned char>* buffer_view) const = 0;
30 33
34 // Gets layout dump flags (i.e. dump-as-text or dump-as-markup) requested
35 // by the test (i.e. via testRunner.dumpAsText() called from javascript).
36 virtual LayoutDumpFlags GetLayoutDumpFlags() = 0;
37
38 // If custom text dump is present (i.e. if testRunner.setCustomTextOutput has
39 // been called from javascript), then returns |true| and populates the
40 // |custom_text_dump| argument. Otherwise returns |false|.
41 virtual bool HasCustomTextDump(std::string* custom_text_dump) const = 0;
42
31 // Returns true if the call to WebTestProxy::captureTree will invoke 43 // Returns true if the call to WebTestProxy::captureTree will invoke
32 // WebTestDelegate::captureHistoryForWindow. 44 // WebTestDelegate::captureHistoryForWindow.
33 virtual bool ShouldDumpBackForwardList() const = 0; 45 virtual bool ShouldDumpBackForwardList() const = 0;
34 46
35 // Returns true if WebTestProxy::capturePixels should be invoked after 47 // Returns true if WebTestProxy::capturePixels should be invoked after
36 // capturing text results. 48 // capturing text results.
37 virtual bool ShouldGeneratePixelResults() = 0; 49 virtual bool ShouldGeneratePixelResults() = 0;
38 50
39 virtual bool ShouldStayOnPageAfterHandlingBeforeUnload() const = 0; 51 virtual bool ShouldStayOnPageAfterHandlingBeforeUnload() const = 0;
40 }; 52 };
41 53
42 } // namespace test_runner 54 } // namespace test_runner
43 55
44 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_RUNNER_H_ 56 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_RUNNER_H_
OLDNEW
« no previous file with comments | « components/test_runner/web_test_proxy.cc ('k') | content/shell/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698