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

Unified Diff: webkit/tools/test_shell/test_webview_delegate.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/tools/test_shell/test_shell.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_webview_delegate.cc
===================================================================
--- webkit/tools/test_shell/test_webview_delegate.cc (revision 19736)
+++ webkit/tools/test_shell/test_webview_delegate.cc (working copy)
@@ -18,6 +18,7 @@
#include "base/string_util.h"
#include "base/trace_event.h"
#include "net/base/net_errors.h"
+#include "webkit/api/public/WebData.h"
#include "webkit/api/public/WebDataSource.h"
#include "webkit/api/public/WebDragData.h"
#include "webkit/api/public/WebHistoryItem.h"
@@ -50,6 +51,7 @@
#include "webkit/tools/test_shell/drop_delegate.h"
#endif
+using WebKit::WebData;
using WebKit::WebDataSource;
using WebKit::WebDragData;
using WebKit::WebHistoryItem;
@@ -342,18 +344,15 @@
static_cast<TestShellExtraData*>(failed_ds->extraData());
bool replace = extra_data && extra_data->pending_page_id != -1;
- WebURLRequest request = failed_ds->request();
-
- std::string error_text =
+ const std::string& error_text =
StringPrintf("Error %d when loading url %s", error.reason,
- request.url().spec().data());
- request.setURL(GURL("testshell-error:"));
+ failed_ds->request().url().spec().data());
// Make sure we never show errors in view source mode.
frame->SetInViewSourceMode(false);
- frame->LoadAlternateHTMLString(
- request, error_text, error.unreachableURL, replace);
+ frame->LoadHTMLString(
+ error_text, GURL("testshell-error:"), error.unreachableURL, replace);
}
void TestWebViewDelegate::DidCommitLoadForFrame(WebView* webview,
« no previous file with comments | « webkit/tools/test_shell/test_shell.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698