OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/request_util.h" | 5 #include "google_apis/drive/request_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 util { | 10 namespace util { |
11 | 11 |
12 TEST(GenerateIfMatchHeaderTest, GenerateIfMatchHeader) { | 12 TEST(GenerateIfMatchHeaderTest, GenerateIfMatchHeader) { |
13 // The header matched to all etag should be returned for empty etag. | 13 // The header matched to all etag should be returned for empty etag. |
14 EXPECT_EQ("If-Match: *", GenerateIfMatchHeader(std::string())); | 14 EXPECT_EQ("If-Match: *", GenerateIfMatchHeader(std::string())); |
15 | 15 |
16 // Otherwise, the returned header should be matched to the given etag. | 16 // Otherwise, the returned header should be matched to the given etag. |
17 EXPECT_EQ("If-Match: abcde", GenerateIfMatchHeader("abcde")); | 17 EXPECT_EQ("If-Match: abcde", GenerateIfMatchHeader("abcde")); |
18 EXPECT_EQ("If-Match: fake_etag", GenerateIfMatchHeader("fake_etag")); | 18 EXPECT_EQ("If-Match: fake_etag", GenerateIfMatchHeader("fake_etag")); |
19 } | 19 } |
20 | 20 |
21 } // namespace util | 21 } // namespace util |
22 } // namespace google_apis | 22 } // namespace google_apis |
OLD | NEW |