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

Side by Side Diff: content/shell/webkit_test_runner.h

Issue 13159005: Enable media stream layout test with content_shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/shell/webkit_test_runner.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_SHELL_WEBKIT_TEST_RUNNER_H_ 5 #ifndef CONTENT_SHELL_WEBKIT_TEST_RUNNER_H_
6 #define CONTENT_SHELL_WEBKIT_TEST_RUNNER_H_ 6 #define CONTENT_SHELL_WEBKIT_TEST_RUNNER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "content/public/renderer/render_view_observer.h" 12 #include "content/public/renderer/render_view_observer.h"
13 #include "content/public/renderer/render_view_observer_tracker.h" 13 #include "content/public/renderer/render_view_observer_tracker.h"
14 #include "content/shell/shell_test_configuration.h" 14 #include "content/shell/shell_test_configuration.h"
15 #include "third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/public/Web Preferences.h" 15 #include "third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/public/Web Preferences.h"
16 #include "third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/public/Web TestDelegate.h" 16 #include "third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/public/Web TestDelegate.h"
17 #include "v8/include/v8.h" 17 #include "v8/include/v8.h"
18 18
19 class SkCanvas; 19 class SkCanvas;
20 20
21 namespace WebKit { 21 namespace WebKit {
22 class WebMediaPlayer;
23 class WebMediaPlayerClient;
22 struct WebRect; 24 struct WebRect;
23 } 25 }
24 26
25 namespace WebTestRunner { 27 namespace WebTestRunner {
26 class WebTestProxyBase; 28 class WebTestProxyBase;
27 } 29 }
28 30
31 namespace webkit_glue {
32 class TestMediaStreamClient;
33 }
34
29 namespace content { 35 namespace content {
30 36
31 // This is the renderer side of the webkit test runner. 37 // This is the renderer side of the webkit test runner.
32 class WebKitTestRunner : public RenderViewObserver, 38 class WebKitTestRunner : public RenderViewObserver,
33 public RenderViewObserverTracker<WebKitTestRunner>, 39 public RenderViewObserverTracker<WebKitTestRunner>,
34 public WebTestRunner::WebTestDelegate { 40 public WebTestRunner::WebTestDelegate {
35 public: 41 public:
36 explicit WebKitTestRunner(RenderView* render_view); 42 explicit WebKitTestRunner(RenderView* render_view);
37 virtual ~WebKitTestRunner(); 43 virtual ~WebKitTestRunner();
38 44
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 virtual int navigationEntryCount(); 89 virtual int navigationEntryCount();
84 virtual void goToOffset(int offset); 90 virtual void goToOffset(int offset);
85 virtual void reload(); 91 virtual void reload();
86 virtual void loadURLForFrame(const WebKit::WebURL& url, 92 virtual void loadURLForFrame(const WebKit::WebURL& url,
87 const std::string& frame_name); 93 const std::string& frame_name);
88 virtual bool allowExternalPages(); 94 virtual bool allowExternalPages();
89 virtual void captureHistoryForWindow( 95 virtual void captureHistoryForWindow(
90 WebTestRunner::WebTestProxyBase* proxy, 96 WebTestRunner::WebTestProxyBase* proxy,
91 WebKit::WebVector<WebKit::WebHistoryItem>* history, 97 WebKit::WebVector<WebKit::WebHistoryItem>* history,
92 size_t* currentEntryIndex); 98 size_t* currentEntryIndex);
99 virtual WebKit::WebMediaPlayer* createWebMediaPlayer(
100 WebKit::WebFrame* frame,
101 const WebKit::WebURL& url,
102 WebKit::WebMediaPlayerClient* client);
93 103
94 void Reset(); 104 void Reset();
95 105
96 void set_proxy(::WebTestRunner::WebTestProxyBase* proxy) { proxy_ = proxy; } 106 void set_proxy(::WebTestRunner::WebTestProxyBase* proxy) { proxy_ = proxy; }
97 ::WebTestRunner::WebTestProxyBase* proxy() const { return proxy_; } 107 ::WebTestRunner::WebTestProxyBase* proxy() const { return proxy_; }
98 108
99 private: 109 private:
100 // Message handlers. 110 // Message handlers.
101 void OnSetTestConfiguration(const ShellTestConfiguration& params); 111 void OnSetTestConfiguration(const ShellTestConfiguration& params);
102 void OnSessionHistory( 112 void OnSessionHistory(
(...skipping 15 matching lines...) Expand all
118 ShellTestConfiguration test_config_; 128 ShellTestConfiguration test_config_;
119 129
120 std::vector<int> routing_ids_; 130 std::vector<int> routing_ids_;
121 std::vector<std::vector<std::string> > session_histories_; 131 std::vector<std::vector<std::string> > session_histories_;
122 std::vector<unsigned> current_entry_indexes_; 132 std::vector<unsigned> current_entry_indexes_;
123 133
124 bool is_main_window_; 134 bool is_main_window_;
125 135
126 bool focus_on_next_commit_; 136 bool focus_on_next_commit_;
127 137
138 scoped_ptr<webkit_glue::TestMediaStreamClient> test_media_stream_client_;
139
128 DISALLOW_COPY_AND_ASSIGN(WebKitTestRunner); 140 DISALLOW_COPY_AND_ASSIGN(WebKitTestRunner);
129 }; 141 };
130 142
131 } // namespace content 143 } // namespace content
132 144
133 #endif // CONTENT_SHELL_WEBKIT_TEST_RUNNER_H_ 145 #endif // CONTENT_SHELL_WEBKIT_TEST_RUNNER_H_
OLDNEW
« no previous file with comments | « no previous file | content/shell/webkit_test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698