diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-10 04:29:17 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-10 04:29:17 +0000 |
commit | 3d96893747d18a3c1bf06084d4605a4b34af732f (patch) | |
tree | 9347442c4dd581ab825ed22cddc082e6119000e4 /webkit/glue/bookmarklet_unittest.cc | |
parent | 47b0ee174aa53dd1fd473bafae35166538f57a68 (diff) | |
download | chromium_src-3d96893747d18a3c1bf06084d4605a4b34af732f.zip chromium_src-3d96893747d18a3c1bf06084d4605a4b34af732f.tar.gz chromium_src-3d96893747d18a3c1bf06084d4605a4b34af732f.tar.bz2 |
Hook up WebFrameClient, replacing many WebViewDelegate methods.
Moved NavigationGesture out of webview_delegate.h into its own
header in chrome/common since it is only needed by Chrome.
Adds WebFrame::isProcessingUserGesture to facilitate the removal
of NavigationGesture.
Cleaned up some TestShell methods related to URL loading. The
method to load an URL now takes a GURL instead of a wchar_t*.
R=dglazkov
BUG=21332
TEST=none
Review URL: http://codereview.chromium.org/200054
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25841 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/bookmarklet_unittest.cc')
-rw-r--r-- | webkit/glue/bookmarklet_unittest.cc | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/webkit/glue/bookmarklet_unittest.cc b/webkit/glue/bookmarklet_unittest.cc index 4412d61..e6718c7 100644 --- a/webkit/glue/bookmarklet_unittest.cc +++ b/webkit/glue/bookmarklet_unittest.cc @@ -21,13 +21,14 @@ class BookmarkletTest : public TestShellTest { virtual void SetUp() { TestShellTest::SetUp(); - test_shell_->LoadURL(L"data:text/html,start page"); + test_shell_->LoadURL(GURL("data:text/html,start page")); test_shell_->WaitTestFinished(); } }; TEST_F(BookmarkletTest, Redirect) { - test_shell_->LoadURL(L"javascript:location.href='data:text/plain,SUCCESS'"); + test_shell_->LoadURL( + GURL("javascript:location.href='data:text/plain,SUCCESS'")); test_shell_->WaitTestFinished(); std::wstring text = test_shell_->GetDocumentText(); EXPECT_EQ(L"SUCCESS", text); @@ -38,7 +39,8 @@ TEST_F(BookmarkletTest, RedirectVoided) { // here is to emphasize that in either case the assignment to location during // the evaluation of the script should suppress loading the script result. // Here, because of the void() wrapping there is no script result. - test_shell_->LoadURL(L"javascript:void(location.href='data:text/plain,SUCCESS')"); + test_shell_->LoadURL( + GURL("javascript:void(location.href='data:text/plain,SUCCESS')")); test_shell_->WaitTestFinished(); std::wstring text = test_shell_->GetDocumentText(); EXPECT_EQ(L"SUCCESS", text); @@ -59,17 +61,17 @@ TEST_F(BookmarkletTest, NonEmptyResult) { EXPECT_EQ(L"false", text); #endif - test_shell_->LoadURL(L"javascript:'hello world'"); + test_shell_->LoadURL(GURL("javascript:'hello world'")); MessageLoop::current()->RunAllPending(); text = test_shell_->GetDocumentText(); EXPECT_EQ(L"hello world", text); } TEST_F(BookmarkletTest, DocumentWrite) { - test_shell_->LoadURL( - L"javascript:document.open();" - L"document.write('hello world');" - L"document.close()"); + test_shell_->LoadURL(GURL( + "javascript:document.open();" + "document.write('hello world');" + "document.close()")); MessageLoop::current()->RunAllPending(); std::wstring text = test_shell_->GetDocumentText(); EXPECT_EQ(L"hello world", text); |