diff options
author | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-23 01:02:02 +0000 |
---|---|---|
committer | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-23 01:02:02 +0000 |
commit | 544219f4ebbc269a5b4cc7346286d1a21d5138c2 (patch) | |
tree | bfb3cf20316612e32bfd2a9cea681c306dbc6b11 /webkit/tools/test_shell/test_shell.h | |
parent | 1da70a5924f41d7e2682c43e175b1b05796d13d4 (diff) | |
download | chromium_src-544219f4ebbc269a5b4cc7346286d1a21d5138c2.zip chromium_src-544219f4ebbc269a5b4cc7346286d1a21d5138c2.tar.gz chromium_src-544219f4ebbc269a5b4cc7346286d1a21d5138c2.tar.bz2 |
Dump text/image on notifyDone.
Review URL: http://codereview.chromium.org/18440
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8532 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/test_shell.h')
-rw-r--r-- | webkit/tools/test_shell/test_shell.h | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/webkit/tools/test_shell/test_shell.h b/webkit/tools/test_shell/test_shell.h index d6afe61..0777ae0 100644 --- a/webkit/tools/test_shell/test_shell.h +++ b/webkit/tools/test_shell/test_shell.h @@ -64,6 +64,8 @@ public: // Filename we dump pixels to (when pixel testing is enabled). std::wstring pixel_file_name; + // URL of the test. + std::string test_url; }; TestShell(); @@ -194,14 +196,19 @@ public: // window JavaScript objects so they can be accessed by layout tests. virtual void BindJSObjectsToWindow(WebFrame* frame); - // Runs a layout test. Loads a single file into the first available - // window, then dumps the requested text representation to stdout. - // Returns false if the test cannot be run because no windows are open. - static bool RunFileTest(const char* filename, const TestParams& params); + // Runs a layout test. Loads a single file (specified in params.test_url) + // into the first available window, then dumps the requested text + // representation to stdout. Returns false if the test cannot be run + // because no windows are open. + static bool RunFileTest(const TestParams& params); // Writes the back-forward list data for every open window into result. static void DumpBackForwardList(std::wstring* result); + // Dumps the output from given test as text and/or image depending on + // the flags set. + static void Dump(TestShell* shell); + // Writes the image captured from the given web frame to the given file. // The returned string is the ASCII-ized MD5 sum of the image. static std::string DumpImage(WebFrame* web_frame, @@ -244,6 +251,11 @@ public: void set_is_modal(bool value) { is_modal_ = value; } bool is_modal() const { return is_modal_; } + const TestParams* test_params() { return test_params_; } + void set_test_params(const TestParams* test_params) { + test_params_ = test_params; + } + #if defined(OS_MACOSX) // handle cleaning up a shell given the associated window static void DestroyAssociatedShell(gfx::NativeWindow handle); @@ -288,8 +300,8 @@ private: // A set of all our windows. static WindowList* window_list_; #if defined(OS_MACOSX) - static base::LazyInstance<std::map<gfx::NativeWindow, TestShell *> > - window_map_; + typedef std::map<gfx::NativeWindow, TestShell *> WindowMap; + static base::LazyInstance<WindowMap> window_map_; #endif #if defined(OS_WIN) @@ -312,6 +324,8 @@ private: scoped_refptr<TestWebViewDelegate> delegate_; + const TestParams* test_params_; + // True while a test is preparing to run bool test_is_preparing_; |