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

Unified Diff: webkit/tools/test_shell/test_shell.h

Issue 1606: hodgepodge for test_shell.cc (Closed)
Patch Set: update some comments Created 12 years, 3 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 | « webkit/tools/test_shell/run_all_tests.cc ('k') | webkit/tools/test_shell/test_shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_shell.h
diff --git a/webkit/tools/test_shell/test_shell.h b/webkit/tools/test_shell/test_shell.h
index b6cf9ec0bbd1c193c229a4432129eb34c257d6fa..33b1a544a5bda681d09b9b9f3dd26b5ba9ab6c51 100644
--- a/webkit/tools/test_shell/test_shell.h
+++ b/webkit/tools/test_shell/test_shell.h
@@ -40,11 +40,17 @@
#include "webkit/tools/test_shell/webview_host.h"
#include "webkit/tools/test_shell/webwidget_host.h"
-typedef std::list<HWND> WindowList;
+#if defined(OS_WIN)
+typedef HWND WindowHandle;
+#else // null port.
+typedef void* WindowHandle;
+#endif
+typedef std::list<WindowHandle> WindowList;
struct WebPreferences;
class TestNavigationEntry;
class TestNavigationController;
+class TestShellImpl;
class TestShell {
public:
@@ -144,10 +150,10 @@ public:
void DumpDocumentText();
void DumpRenderTree();
- HWND mainWnd() const { return m_mainWnd; }
- HWND webViewWnd() const { return m_webViewHost->window_handle(); }
- HWND editWnd() const { return m_editWnd; }
- HWND popupWnd() const { return m_popupHost->window_handle(); }
+ WindowHandle mainWnd() const { return m_mainWnd; }
+ WindowHandle webViewWnd() const { return m_webViewHost->window_handle(); }
+ WindowHandle editWnd() const { return m_editWnd; }
+ WindowHandle popupWnd() const { return m_popupHost->window_handle(); }
static WindowList* windowList() { return window_list_; }
@@ -161,7 +167,9 @@ public:
WebWidget* CreatePopupWidget(WebView* webview);
void ClosePopup();
+#if defined(OS_WIN)
static ATOM RegisterWindowClass();
+#endif
// Called by the WebView delegate WindowObjectCleared() method, this
// binds the layout_test_controller_ and other C++ controller classes to
@@ -197,9 +205,11 @@ public:
// Get the timeout for running a test.
static int GetFileTestTimeout() { return file_test_timeout_ms_; }
+#if defined(OS_WIN)
// Access to the finished event. Used by the static WatchDog
// thread.
HANDLE finished_event() { return finished_event_; }
+#endif
// Have the shell print the StatsTable to stdout on teardown.
void DumpStatsTableOnExit() { dump_stats_table_on_exit_ = true; }
@@ -215,15 +225,13 @@ protected:
void SizeTo(int width, int height);
void ResizeSubViews();
- static LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
- static LRESULT CALLBACK EditWndProc(HWND, UINT, WPARAM, LPARAM);
-
protected:
- HWND m_mainWnd;
- HWND m_editWnd;
+ scoped_ptr<TestShellImpl> m_impl;
+
+ WindowHandle m_mainWnd;
+ WindowHandle m_editWnd;
scoped_ptr<WebViewHost> m_webViewHost;
WebWidgetHost* m_popupHost;
- WNDPROC default_edit_wnd_proc_;
// Primitive focus controller for layout test mode.
WebWidgetHost* m_focusedWidgetHost;
@@ -232,8 +240,6 @@ private:
// A set of all our windows.
static WindowList* window_list_;
- static HINSTANCE instance_handle_;
-
// False when the app is being run using the --layout-tests switch.
static bool interactive_;
@@ -262,8 +268,10 @@ private:
// The preferences for the test shell.
static WebPreferences* web_prefs_;
+#if defined(OS_WIN)
// Used by the watchdog to know when it's finished.
HANDLE finished_event_;
+#endif
// Dump the stats table counters on exit.
bool dump_stats_table_on_exit_;
« no previous file with comments | « webkit/tools/test_shell/run_all_tests.cc ('k') | webkit/tools/test_shell/test_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698