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

Unified Diff: ppapi/tests/test_url_loader.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 months 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_ime_input_event.cc ('k') | ppapi/tests/test_websocket.cc » ('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 112a483d68da058837ac39eca918ad75da94623e..320167a13faba4759048832f72993649101bbe76 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, "");
+ return LoadAndCompareBody(request, std::string());
}
std::string TestURLLoader::TestBinaryDataPOST() {
@@ -558,11 +558,12 @@ std::string TestURLLoader::TestUntrustedHttpRequests() {
// valid token (containing special characters like CR, LF).
// http://www.w3.org/TR/XMLHttpRequest/
{
- 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);
+ 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);
}
// HTTP methods are restricted only for untrusted loaders. Try all headers
// that are forbidden by http://www.w3.org/TR/XMLHttpRequest/.
@@ -619,9 +620,9 @@ std::string TestURLLoader::TestUntrustedHttpRequests() {
std::string TestURLLoader::TestTrustedHttpRequests() {
// Trusted requests can use restricted methods.
{
- ASSERT_EQ(OpenTrusted("cOnNeCt", ""), PP_OK);
- ASSERT_EQ(OpenTrusted("tRaCk", ""), PP_OK);
- ASSERT_EQ(OpenTrusted("tRaCe", ""), PP_OK);
+ ASSERT_EQ(OpenTrusted("cOnNeCt", std::string()), PP_OK);
+ ASSERT_EQ(OpenTrusted("tRaCk", std::string()), PP_OK);
+ ASSERT_EQ(OpenTrusted("tRaCe", std::string()), PP_OK);
}
// Trusted requests can use restricted headers.
{
« no previous file with comments | « ppapi/tests/test_ime_input_event.cc ('k') | ppapi/tests/test_websocket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698