diff options
Diffstat (limited to 'ppapi/tests/test_url_loader.cc')
-rw-r--r-- | ppapi/tests/test_url_loader.cc | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/ppapi/tests/test_url_loader.cc b/ppapi/tests/test_url_loader.cc index 320167a..112a483 100644 --- a/ppapi/tests/test_url_loader.cc +++ b/ppapi/tests/test_url_loader.cc @@ -375,7 +375,7 @@ std::string TestURLLoader::TestEmptyDataPOST() { request.SetURL("/echo"); request.SetMethod("POST"); request.AppendDataToBody("", 0); - return LoadAndCompareBody(request, std::string()); + return LoadAndCompareBody(request, ""); } std::string TestURLLoader::TestBinaryDataPOST() { @@ -558,12 +558,11 @@ std::string TestURLLoader::TestUntrustedHttpRequests() { // valid token (containing special characters like CR, LF). // http://www.w3.org/TR/XMLHttpRequest/ { - ASSERT_EQ(OpenUntrusted("cOnNeCt", std::string()), PP_ERROR_NOACCESS); - ASSERT_EQ(OpenUntrusted("tRaCk", std::string()), PP_ERROR_NOACCESS); - ASSERT_EQ(OpenUntrusted("tRaCe", std::string()), PP_ERROR_NOACCESS); - ASSERT_EQ( - OpenUntrusted("POST\x0d\x0ax-csrf-token:\x20test1234", std::string()), - PP_ERROR_NOACCESS); + ASSERT_EQ(OpenUntrusted("cOnNeCt", ""), PP_ERROR_NOACCESS); + ASSERT_EQ(OpenUntrusted("tRaCk", ""), PP_ERROR_NOACCESS); + ASSERT_EQ(OpenUntrusted("tRaCe", ""), PP_ERROR_NOACCESS); + ASSERT_EQ(OpenUntrusted("POST\x0d\x0ax-csrf-token:\x20test1234", ""), + PP_ERROR_NOACCESS); } // HTTP methods are restricted only for untrusted loaders. Try all headers // that are forbidden by http://www.w3.org/TR/XMLHttpRequest/. @@ -620,9 +619,9 @@ std::string TestURLLoader::TestUntrustedHttpRequests() { std::string TestURLLoader::TestTrustedHttpRequests() { // Trusted requests can use restricted methods. { - ASSERT_EQ(OpenTrusted("cOnNeCt", std::string()), PP_OK); - ASSERT_EQ(OpenTrusted("tRaCk", std::string()), PP_OK); - ASSERT_EQ(OpenTrusted("tRaCe", std::string()), PP_OK); + ASSERT_EQ(OpenTrusted("cOnNeCt", ""), PP_OK); + ASSERT_EQ(OpenTrusted("tRaCk", ""), PP_OK); + ASSERT_EQ(OpenTrusted("tRaCe", ""), PP_OK); } // Trusted requests can use restricted headers. { |