OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef PAPPI_TESTS_TEST_URL_LOADER_H_ | 5 #ifndef PAPPI_TESTS_TEST_URL_LOADER_H_ |
6 #define PAPPI_TESTS_TEST_URL_LOADER_H_ | 6 #define PAPPI_TESTS_TEST_URL_LOADER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ppapi/tests/test_case.h" | 10 #include "ppapi/tests/test_case.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 private: | 31 private: |
32 std::string ReadEntireFile(pp::FileIO* file_io, std::string* data); | 32 std::string ReadEntireFile(pp::FileIO* file_io, std::string* data); |
33 std::string ReadEntireResponseBody(pp::URLLoader* loader, | 33 std::string ReadEntireResponseBody(pp::URLLoader* loader, |
34 std::string* body); | 34 std::string* body); |
35 std::string LoadAndCompareBody(const pp::URLRequestInfo& request, | 35 std::string LoadAndCompareBody(const pp::URLRequestInfo& request, |
36 const std::string& expected_body); | 36 const std::string& expected_body); |
37 int32_t OpenFileSystem(pp::FileSystem* file_system, std::string* message); | 37 int32_t OpenFileSystem(pp::FileSystem* file_system, std::string* message); |
38 int32_t PrepareFileForPost(const pp::FileRef& file_ref, | 38 int32_t PrepareFileForPost(const pp::FileRef& file_ref, |
39 const std::string& data, | 39 const std::string& data, |
40 std::string* message); | 40 std::string* message); |
41 std::string GetReachableCrossOriginURL(); | 41 std::string GetReachableAbsoluteURL(const std::string& file_name); |
| 42 std::string GetReachableCrossOriginURL(const std::string& file_name); |
42 int32_t OpenUntrusted(const pp::URLRequestInfo& request); | 43 int32_t OpenUntrusted(const pp::URLRequestInfo& request); |
43 int32_t OpenTrusted(const pp::URLRequestInfo& request); | 44 int32_t OpenTrusted(const pp::URLRequestInfo& request); |
44 int32_t OpenUntrusted(const std::string& method, | 45 int32_t OpenUntrusted(const std::string& method, |
45 const std::string& header); | 46 const std::string& header); |
46 int32_t OpenTrusted(const std::string& method, | 47 int32_t OpenTrusted(const std::string& method, |
47 const std::string& header); | 48 const std::string& header); |
48 int32_t Open(const pp::URLRequestInfo& request, | 49 int32_t Open(const pp::URLRequestInfo& request, |
49 bool with_universal_access); | 50 bool with_universal_access); |
50 | 51 |
51 std::string TestBasicGET(); | 52 std::string TestBasicGET(); |
52 std::string TestBasicPOST(); | 53 std::string TestBasicPOST(); |
53 std::string TestBasicFilePOST(); | 54 std::string TestBasicFilePOST(); |
54 std::string TestBasicFileRangePOST(); | 55 std::string TestBasicFileRangePOST(); |
55 std::string TestCompoundBodyPOST(); | 56 std::string TestCompoundBodyPOST(); |
56 std::string TestEmptyDataPOST(); | 57 std::string TestEmptyDataPOST(); |
57 std::string TestBinaryDataPOST(); | 58 std::string TestBinaryDataPOST(); |
58 std::string TestCustomRequestHeader(); | 59 std::string TestCustomRequestHeader(); |
59 std::string TestFailsBogusContentLength(); | 60 std::string TestFailsBogusContentLength(); |
60 std::string TestStreamToFile(); | 61 std::string TestStreamToFile(); |
61 std::string TestUntrustedSameOriginRestriction(); | 62 std::string TestUntrustedSameOriginRestriction(); |
62 std::string TestTrustedSameOriginRestriction(); | 63 std::string TestTrustedSameOriginRestriction(); |
63 std::string TestUntrustedCrossOriginRequest(); | 64 std::string TestUntrustedCrossOriginRequest(); |
64 std::string TestTrustedCrossOriginRequest(); | 65 std::string TestTrustedCrossOriginRequest(); |
65 std::string TestUntrustedJavascriptURLRestriction(); | 66 std::string TestUntrustedJavascriptURLRestriction(); |
66 std::string TestTrustedJavascriptURLRestriction(); | 67 std::string TestTrustedJavascriptURLRestriction(); |
67 std::string TestUntrustedHttpRequests(); | 68 std::string TestUntrustedHttpRequests(); |
68 std::string TestTrustedHttpRequests(); | 69 std::string TestTrustedHttpRequests(); |
| 70 std::string TestFollowURLRedirect(); |
69 std::string TestAuditURLRedirect(); | 71 std::string TestAuditURLRedirect(); |
70 std::string TestAbortCalls(); | 72 std::string TestAbortCalls(); |
71 std::string TestUntendedLoad(); | 73 std::string TestUntendedLoad(); |
72 | 74 |
73 const PPB_FileIOTrusted* file_io_trusted_interface_; | 75 const PPB_FileIOTrusted* file_io_trusted_interface_; |
74 const PPB_URLLoaderTrusted* url_loader_trusted_interface_; | 76 const PPB_URLLoaderTrusted* url_loader_trusted_interface_; |
75 }; | 77 }; |
76 | 78 |
77 #endif // PAPPI_TESTS_TEST_URL_LOADER_H_ | 79 #endif // PAPPI_TESTS_TEST_URL_LOADER_H_ |
OLD | NEW |