OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "webkit/media/cache_util.h" | 5 #include "webkit/media/cache_util.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
11 #include "base/string_number_conversions.h" | 11 #include "base/string_number_conversions.h" |
12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
13 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | |
14 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRespon
se.h" | |
15 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" |
| 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebURLResponse.h" |
16 | 16 |
17 using WebKit::WebString; | 17 using WebKit::WebString; |
18 using WebKit::WebURLResponse; | 18 using WebKit::WebURLResponse; |
19 | 19 |
20 namespace webkit_media { | 20 namespace webkit_media { |
21 | 21 |
22 // Inputs & expected output for GetReasonsForUncacheability. | 22 // Inputs & expected output for GetReasonsForUncacheability. |
23 struct GRFUTestCase { | 23 struct GRFUTestCase { |
24 WebURLResponse::HTTPVersion version; | 24 WebURLResponse::HTTPVersion version; |
25 int status_code; | 25 int status_code; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 SCOPED_TRACE(StringPrintf("case: %" PRIuS | 88 SCOPED_TRACE(StringPrintf("case: %" PRIuS |
89 ", version: %d, code: %d, headers: %s", | 89 ", version: %d, code: %d, headers: %s", |
90 i, tests[i].version, tests[i].status_code, | 90 i, tests[i].version, tests[i].status_code, |
91 tests[i].headers)); | 91 tests[i].headers)); |
92 EXPECT_EQ(GetReasonsForUncacheability(CreateResponse(tests[i])), | 92 EXPECT_EQ(GetReasonsForUncacheability(CreateResponse(tests[i])), |
93 tests[i].expected_reasons); | 93 tests[i].expected_reasons); |
94 } | 94 } |
95 } | 95 } |
96 | 96 |
97 } // namespace webkit_media | 97 } // namespace webkit_media |
OLD | NEW |