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

Unified Diff: webkit/glue/bookmarklet_unittest.cc

Issue 200054: Hook up WebFrameClient, replacing many WebViewDelegate methods.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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/api/public/WebFrameClient.h ('k') | webkit/glue/chrome_client_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/bookmarklet_unittest.cc
===================================================================
--- webkit/glue/bookmarklet_unittest.cc (revision 25715)
+++ webkit/glue/bookmarklet_unittest.cc (working copy)
@@ -21,13 +21,14 @@
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 @@
// 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 @@
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);
« no previous file with comments | « webkit/api/public/WebFrameClient.h ('k') | webkit/glue/chrome_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698