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

Unified Diff: content/shell/webkit_test_runner.h

Issue 11245004: [content shell] link against the TestRunner library (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing Created 8 years, 2 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
« no previous file with comments | « content/shell/shell_render_process_observer.cc ('k') | content/shell/webkit_test_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/webkit_test_runner.h
diff --git a/content/shell/webkit_test_runner.h b/content/shell/webkit_test_runner.h
index 539ed097fdf7c532e8af3e8f30528d1c075423ab..c6482d0d41c1d8e80dc21777a0eb5ebe533797b7 100644
--- a/content/shell/webkit_test_runner.h
+++ b/content/shell/webkit_test_runner.h
@@ -5,12 +5,15 @@
#ifndef CONTENT_SHELL_WEBKIT_TEST_RUNNER_H_
#define CONTENT_SHELL_WEBKIT_TEST_RUNNER_H_
+#include "base/memory/scoped_ptr.h"
#include "content/public/renderer/render_view_observer.h"
+#include "third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h"
namespace content {
// This is the renderer side of the webkit test runner.
-class WebKitTestRunner : public RenderViewObserver {
+class WebKitTestRunner : public RenderViewObserver,
+ public WebTestRunner::WebTestDelegate {
public:
explicit WebKitTestRunner(RenderView* render_view);
virtual ~WebKitTestRunner();
@@ -19,11 +22,38 @@ class WebKitTestRunner : public RenderViewObserver {
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void DidClearWindowObject(WebKit::WebFrame* frame) OVERRIDE;
virtual void DidFinishLoad(WebKit::WebFrame* frame) OVERRIDE;
+ virtual void DidRequestShowContextMenu(
+ WebKit::WebFrame* frame,
+ const WebKit::WebContextMenuData& data) OVERRIDE;
+
+ // WebTestDelegate implementation.
+ virtual void clearContextMenuData() OVERRIDE;
+ virtual void clearEditCommand() OVERRIDE;
+ virtual void fillSpellingSuggestionList(
+ const WebKit::WebString& word,
+ WebKit::WebVector<WebKit::WebString>* suggestions) OVERRIDE;
+ virtual void setEditCommand(const std::string& name,
+ const std::string& value) OVERRIDE;
+ virtual WebKit::WebContextMenuData* lastContextMenuData() const OVERRIDE;
+ virtual void setGamepadData(const WebKit::WebGamepads& gamepads) OVERRIDE;
+ virtual void printMessage(const std::string& message) OVERRIDE;
+ virtual void postTask(WebTestRunner::WebTask* task) OVERRIDE;
+ virtual void postDelayedTask(WebTestRunner::WebTask* task,
+ long long ms) OVERRIDE;
+ virtual WebKit::WebString registerIsolatedFileSystem(
+ const WebKit::WebVector<WebKit::WebString>& absolute_filenames) OVERRIDE;
+ virtual long long getCurrentTimeInMillisecond() OVERRIDE;
+ virtual WebKit::WebString getAbsoluteWebStringFromUTF8Path(
+ const std::string& utf8_path) OVERRIDE;
private:
// Message handlers.
void OnCaptureTextDump(bool as_text, bool printing, bool recursive);
void OnCaptureImageDump(const std::string& expected_pixel_hash);
+ void OnSetIsMainWindow();
+
+ scoped_ptr<WebKit::WebContextMenuData> last_context_menu_data_;
+ bool is_main_window_;
DISALLOW_COPY_AND_ASSIGN(WebKitTestRunner);
};
« no previous file with comments | « content/shell/shell_render_process_observer.cc ('k') | content/shell/webkit_test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698