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

Side by Side Diff: chrome/browser/google_apis/drive_api_util_unittest.cc

Issue 14352007: Escape backslash (\x5C) for string value of search query. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/google_apis/drive_api_util.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/google_apis/drive_api_util.h" 5 #include "chrome/browser/google_apis/drive_api_util.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace google_apis { 9 namespace google_apis {
10 namespace drive { 10 namespace drive {
11 namespace util { 11 namespace util {
12 12
13 TEST(DriveApiUtilTest, EscapeQueryStringValue) { 13 TEST(DriveApiUtilTest, EscapeQueryStringValue) {
14 EXPECT_EQ("abcde", EscapeQueryStringValue("abcde")); 14 EXPECT_EQ("abcde", EscapeQueryStringValue("abcde"));
15 EXPECT_EQ("\\'", EscapeQueryStringValue("'")); 15 EXPECT_EQ("\\'", EscapeQueryStringValue("'"));
16 EXPECT_EQ("\\'abcde\\'", EscapeQueryStringValue("'abcde'")); 16 EXPECT_EQ("\\'abcde\\'", EscapeQueryStringValue("'abcde'"));
17 EXPECT_EQ("\\\\", EscapeQueryStringValue("\\"));
18 EXPECT_EQ("\\\\\\'", EscapeQueryStringValue("\\'"));
17 } 19 }
18 20
19 } // namespace util 21 } // namespace util
20 } // namespace drive 22 } // namespace drive
21 } // namespace google_apis 23 } // namespace google_apis
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/drive_api_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698