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

Unified Diff: webkit/tools/test_shell/test_shell.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/plugin_tests.cc ('k') | webkit/tools/test_shell/test_webview_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_shell.cc
===================================================================
--- webkit/tools/test_shell/test_shell.cc (revision 19736)
+++ webkit/tools/test_shell/test_shell.cc (working copy)
@@ -526,23 +526,15 @@
// If we are reloading, then WebKit will use the state of the current page.
// Otherwise, we give it the state to navigate to.
- if (!reload && !entry.GetContentState().empty()) {
+ if (reload) {
+ frame->Reload();
+ } else if (!entry.GetContentState().empty()) {
DCHECK(entry.GetPageID() != -1);
frame->LoadHistoryItem(
webkit_glue::HistoryItemFromString(entry.GetContentState()));
} else {
- WebURLRequest::CachePolicy cache_policy;
- if (reload) {
- cache_policy = WebURLRequest::ReloadIgnoringCacheData;
- } else {
- DCHECK(entry.GetPageID() == -1);
- cache_policy = WebURLRequest::UseProtocolCachePolicy;
- }
-
- WebURLRequest request(entry.GetURL());
- request.setCachePolicy(cache_policy);
-
- frame->LoadRequest(request);
+ DCHECK(entry.GetPageID() == -1);
+ frame->LoadRequest(WebURLRequest(entry.GetURL()));
}
// In case LoadRequest failed before DidCreateDataSource was called.
« no previous file with comments | « webkit/tools/test_shell/plugin_tests.cc ('k') | webkit/tools/test_shell/test_webview_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698