summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell/test_shell_win.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-16 21:49:14 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-16 21:49:14 +0000
commit7699d05e38e2e4e26add3357151e0fd793080353 (patch)
treeb0dad38807b641c80089efc9e45af76974068037 /webkit/tools/test_shell/test_shell_win.cc
parent4c2464b49571049ad7128343bfafa9abb3be7e0c (diff)
downloadchromium_src-7699d05e38e2e4e26add3357151e0fd793080353.zip
chromium_src-7699d05e38e2e4e26add3357151e0fd793080353.tar.gz
chromium_src-7699d05e38e2e4e26add3357151e0fd793080353.tar.bz2
Fix test_shell so that eventSender works for opened windows. I've also made focus go to the webview, just like what happens in Chrome.
This is needed for https://bugs.webkit.org/show_bug.cgi?id=36147 and also fixes plugins/keyboard-events.html on Windows. Review URL: http://codereview.chromium.org/1011005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41769 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/test_shell_win.cc')
-rw-r--r--webkit/tools/test_shell/test_shell_win.cc18
1 files changed, 11 insertions, 7 deletions
diff --git a/webkit/tools/test_shell/test_shell_win.cc b/webkit/tools/test_shell/test_shell_win.cc
index 8ce1bcb..8d7f8ec7 100644
--- a/webkit/tools/test_shell/test_shell_win.cc
+++ b/webkit/tools/test_shell/test_shell_win.cc
@@ -275,13 +275,17 @@ bool TestShell::RunFileTest(const TestParams& params) {
if (inspector_test_mode_)
shell->ShowDevTools();
- shell->test_is_preparing_ = true;
- shell->set_test_params(&params);
- shell->LoadURL(GURL(params.test_url));
-
- shell->test_is_preparing_ = false;
- shell->WaitTestFinished();
- shell->set_test_params(NULL);
+ GURL url(params.test_url);
+ if (url.is_valid()) { // Don't hang if we have an invalid path.
+ shell->test_is_preparing_ = true;
+ shell->set_test_params(&params);
+ shell->LoadURL(url);
+ shell->test_is_preparing_ = false;
+ shell->WaitTestFinished();
+ shell->set_test_params(NULL);
+ } else {
+ NOTREACHED() << "Invalid url: " << url.spec();
+ }
return true;
}