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

Unified Diff: webkit/glue/bookmarklet_unittest.cc

Issue 150146: Add Reload and LoadData methods to WebFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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/src/WebURLRequest.cpp ('k') | webkit/glue/cpp_bound_class_unittest.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 19736)
+++ webkit/glue/bookmarklet_unittest.cc (working copy)
@@ -31,6 +31,17 @@
EXPECT_EQ(L"SUCCESS", text);
}
+TEST_F(BookmarkletTest, RedirectVoided) {
+ // This test should be redundant with the Redirect test above. The point
+ // 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_->WaitTestFinished();
+ std::wstring text = test_shell_->GetDocumentText();
+ EXPECT_EQ(L"SUCCESS", text);
+}
+
TEST_F(BookmarkletTest, NonEmptyResult) {
std::wstring text;
« no previous file with comments | « webkit/api/src/WebURLRequest.cpp ('k') | webkit/glue/cpp_bound_class_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698