diff options
author | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-16 22:16:15 +0000 |
---|---|---|
committer | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-16 22:16:15 +0000 |
commit | 7309460d327a8aef20a6bcd07c87b4bdb9628f51 (patch) | |
tree | 89cd3bcc3293757fa70dbd1df0c985a962b686c9 /webkit/tools/test_shell/test_shell_main.cc | |
parent | 33061095739b40f2706b06df97ec9d8bfe64856b (diff) | |
download | chromium_src-7309460d327a8aef20a6bcd07c87b4bdb9628f51.zip chromium_src-7309460d327a8aef20a6bcd07c87b4bdb9628f51.tar.gz chromium_src-7309460d327a8aef20a6bcd07c87b4bdb9628f51.tar.bz2 |
Update te way test shell cleans up on exit.
It turns out that the LayoutTestControllers are only reset
when a test is started. Some tests leave sub-windows open
(e.g. http/tests/security/aboutBlank/security-context-window-open.html)
When these tests are run through the purify runner - which
only runs one test per test shell - the effect is that the
LayoutTestController does not get cleaned up.
BUG=5329
Review URL: http://codereview.chromium.org/18300
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8231 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/test_shell_main.cc')
-rw-r--r-- | webkit/tools/test_shell/test_shell_main.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/webkit/tools/test_shell/test_shell_main.cc b/webkit/tools/test_shell/test_shell_main.cc index b2f9830..f3a051d 100644 --- a/webkit/tools/test_shell/test_shell_main.cc +++ b/webkit/tools/test_shell/test_shell_main.cc @@ -380,7 +380,13 @@ int main(int argc, char* argv[]) { shell->CallJSGC(); shell->CallJSGC(); - if (shell) delete shell; + if (shell) { + // When we finish the last test, cleanup the LayoutTestController. + // It may have references to not-yet-cleaned up windows. By + // cleaning up here we help purify reports. + shell->ResetTestController(); + delete shell; + } } else { MessageLoop::current()->Run(); } |