OLD | NEW |
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 Loading... |
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). |
OLD | NEW |