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

Unified Diff: ppapi/tests/test_url_loader.cc

Issue 10886047: Pepper: Add a X-Requested-With header to URL requests done for Pepper plugins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: foo Created 8 years 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 | « ppapi/tests/test_url_loader.h ('k') | webkit/glue/weburlrequest_extradata_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/test_url_loader.cc
diff --git a/ppapi/tests/test_url_loader.cc b/ppapi/tests/test_url_loader.cc
index 90244912681fc7c77d24b1746db811fa62ff8205..889a4d0ffba67aaf6d5175311dad6e12bc501334 100644
--- a/ppapi/tests/test_url_loader.cc
+++ b/ppapi/tests/test_url_loader.cc
@@ -841,5 +841,17 @@ std::string TestURLLoader::TestPrefetchBufferThreshold() {
PASS();
}
+// TODO(viettrungluu): This test properly belongs elsewhere. It tests that
+// Chrome properly tags URL requests made on behalf of Pepper plugins (with an
+// X-Requested-With header), but this isn't, strictly speaking, a PPAPI
+// behavior.
+std::string TestURLLoader::TestXRequestedWithHeader() {
+ pp::URLRequestInfo request(instance_);
+ request.SetURL("/echoheader?X-Requested-With");
+ // The name and version of the plugin is set from the command-line (see
+ // chrome/test/ppapi/ppapi_test.cc.
+ return LoadAndCompareBody(request, "PPAPI Tests 1.2.3");
+}
+
// TODO(viettrungluu): Add tests for Get{Upload,Download}Progress, Close
// (including abort tests if applicable).
« no previous file with comments | « ppapi/tests/test_url_loader.h ('k') | webkit/glue/weburlrequest_extradata_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698