diff options
author | mmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-14 00:41:45 +0000 |
---|---|---|
committer | mmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-14 00:41:45 +0000 |
commit | 5115474e2e2c773b53fc1e111426e8924deeadb7 (patch) | |
tree | 6bdd56cdd544a3b331db7612781ae347739c4e82 /sandbox/src | |
parent | 609990b5b4254601504935427483e3fc22cfde80 (diff) | |
download | chromium_src-5115474e2e2c773b53fc1e111426e8924deeadb7.zip chromium_src-5115474e2e2c773b53fc1e111426e8924deeadb7.tar.gz chromium_src-5115474e2e2c773b53fc1e111426e8924deeadb7.tar.bz2 |
Use %ls instead of %s in wprintf format strings for wchar_t fields.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@846 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/src')
-rw-r--r-- | sandbox/src/file_policy_test.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sandbox/src/file_policy_test.cc b/sandbox/src/file_policy_test.cc index cb66fa4..54fe56e 100644 --- a/sandbox/src/file_policy_test.cc +++ b/sandbox/src/file_policy_test.cc @@ -359,9 +359,9 @@ TEST(FilePolicyTest, AllowReadOnly) { temp_file_name)); wchar_t command_read[MAX_PATH + 20] = {0}; - wsprintf(command_read, L"File_Create Read \"%s\"", temp_file_name); + wsprintf(command_read, L"File_Create Read \"%ls\"", temp_file_name); wchar_t command_write[MAX_PATH + 20] = {0}; - wsprintf(command_write, L"File_Create Write \"%s\"", temp_file_name); + wsprintf(command_write, L"File_Create Write \"%ls\"", temp_file_name); // Verify that we have read access after revert. EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest(command_read)); @@ -389,7 +389,7 @@ TEST(FilePolicyTest, AllowWildcard) { EXPECT_TRUE(runner.AddFsRule(TargetPolicy::FILES_ALLOW_ANY, temp_directory)); wchar_t command_write[MAX_PATH + 20] = {0}; - wsprintf(command_write, L"File_Create Write \"%s\"", temp_file_name); + wsprintf(command_write, L"File_Create Write \"%ls\"", temp_file_name); // Verify that we have write access after revert. EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest(command_write)); @@ -481,19 +481,19 @@ TEST(FilePolicyTest, TestRename) { wchar_t command[MAX_PATH*2 + 20] = {0}; - wsprintf(command, L"File_Rename \"%s\" \"%s\"", temp_file_name1, + wsprintf(command, L"File_Rename \"%ls\" \"%ls\"", temp_file_name1, temp_file_name2); EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest(command)); - wsprintf(command, L"File_Rename \"%s\" \"%s\"", temp_file_name3, + wsprintf(command, L"File_Rename \"%ls\" \"%ls\"", temp_file_name3, temp_file_name4); EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(command)); - wsprintf(command, L"File_Rename \"%s\" \"%s\"", temp_file_name5, + wsprintf(command, L"File_Rename \"%ls\" \"%ls\"", temp_file_name5, temp_file_name6); EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(command)); - wsprintf(command, L"File_Rename \"%s\" \"%s\"", temp_file_name7, + wsprintf(command, L"File_Rename \"%ls\" \"%ls\"", temp_file_name7, temp_file_name8); EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(command)); |