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

Unified Diff: content/browser/renderer_host/test_render_view_host.cc

Issue 14727006: Check that the files the renderer wants to preserve as part of a session restore are already availa… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add test coverage. Created 7 years, 7 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
Index: content/browser/renderer_host/test_render_view_host.cc
diff --git a/content/browser/renderer_host/test_render_view_host.cc b/content/browser/renderer_host/test_render_view_host.cc
index 0e1792a97f549106d584240df7dc41700a8d40ed..0ab7ae8f9222065c737c576be8796fbf4ac48ce1 100644
--- a/content/browser/renderer_host/test_render_view_host.cc
+++ b/content/browser/renderer_host/test_render_view_host.cc
@@ -360,6 +360,22 @@ void TestRenderViewHost::TestOnStartDragging(
event_info);
}
+void TestRenderViewHost::TestOnUpdateStateWithFile(
+ int process_id,
+ const std::string& file_name) {
+ WebKit::WebHTTPBody http_body;
+ http_body.initialize();
+ const char char_data[] = "data";
+ http_body.appendData(WebKit::WebData(char_data, sizeof(char_data)-1));
darin (slow to review) 2013/05/06 23:39:47 nit: use arraysize() instead of sizeof() just to b
+ http_body.appendFile(WebKit::WebString::fromUTF8(file_name));
+
+ WebKit::WebHistoryItem history_item;
+ history_item.initialize();
+ history_item.setURLString("about::blank");
darin (slow to review) 2013/05/06 23:39:47 nit: Using "about:blank" here might make this test
+ history_item.setHTTPBody(http_body);
+ OnUpdateState(process_id, webkit_glue::HistoryItemToString(history_item));
+}
+
void TestRenderViewHost::set_simulate_fetch_via_proxy(bool proxy) {
simulate_fetch_via_proxy_ = proxy;
}

Powered by Google App Engine
This is Rietveld 408576698