| 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "googleurl/src/gurl.h" | |
| 7 #include "net/base/data_url.h" | 6 #include "net/base/data_url.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include "url/gurl.h" |
| 9 | 9 |
| 10 namespace { | 10 namespace { |
| 11 | 11 |
| 12 struct ParseTestData { | 12 struct ParseTestData { |
| 13 const char* url; | 13 const char* url; |
| 14 bool is_valid; | 14 bool is_valid; |
| 15 const char* mime_type; | 15 const char* mime_type; |
| 16 const char* charset; | 16 const char* charset; |
| 17 const char* data; | 17 const char* data; |
| 18 }; | 18 }; |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 bool ok = | 172 bool ok = |
| 173 net::DataURL::Parse(GURL(tests[i].url), &mime_type, &charset, &data); | 173 net::DataURL::Parse(GURL(tests[i].url), &mime_type, &charset, &data); |
| 174 EXPECT_EQ(ok, tests[i].is_valid); | 174 EXPECT_EQ(ok, tests[i].is_valid); |
| 175 if (tests[i].is_valid) { | 175 if (tests[i].is_valid) { |
| 176 EXPECT_EQ(tests[i].mime_type, mime_type); | 176 EXPECT_EQ(tests[i].mime_type, mime_type); |
| 177 EXPECT_EQ(tests[i].charset, charset); | 177 EXPECT_EQ(tests[i].charset, charset); |
| 178 EXPECT_EQ(tests[i].data, data); | 178 EXPECT_EQ(tests[i].data, data); |
| 179 } | 179 } |
| 180 } | 180 } |
| 181 } | 181 } |
| OLD | NEW |