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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/tests/test_url_loader.h ('k') | webkit/glue/weburlrequest_extradata_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ppapi/tests/test_url_loader.h" 5 #include "ppapi/tests/test_url_loader.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 #include <string.h> 8 #include <string.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 834
835 rv = OpenWithPrefetchBufferThreshold(1000, 1); 835 rv = OpenWithPrefetchBufferThreshold(1000, 1);
836 if (rv != PP_ERROR_FAILED) { 836 if (rv != PP_ERROR_FAILED) {
837 return ReportError("The lower buffer value was higher than the upper but " 837 return ReportError("The lower buffer value was higher than the upper but "
838 "the URLLoader did not fail.", rv); 838 "the URLLoader did not fail.", rv);
839 } 839 }
840 840
841 PASS(); 841 PASS();
842 } 842 }
843 843
844 // TODO(viettrungluu): This test properly belongs elsewhere. It tests that
845 // Chrome properly tags URL requests made on behalf of Pepper plugins (with an
846 // X-Requested-With header), but this isn't, strictly speaking, a PPAPI
847 // behavior.
848 std::string TestURLLoader::TestXRequestedWithHeader() {
849 pp::URLRequestInfo request(instance_);
850 request.SetURL("/echoheader?X-Requested-With");
851 // The name and version of the plugin is set from the command-line (see
852 // chrome/test/ppapi/ppapi_test.cc.
853 return LoadAndCompareBody(request, "PPAPI Tests 1.2.3");
854 }
855
844 // TODO(viettrungluu): Add tests for Get{Upload,Download}Progress, Close 856 // TODO(viettrungluu): Add tests for Get{Upload,Download}Progress, Close
845 // (including abort tests if applicable). 857 // (including abort tests if applicable).
OLDNEW
« 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