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/file_util.h" | |
6 #include "base/files/file.h" | 5 #include "base/files/file.h" |
7 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
| 7 #include "base/files/file_util.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/strings/string_piece.h" | 10 #include "base/strings/string_piece.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 #include "ui/base/resource/data_pack.h" | 12 #include "ui/base/resource/data_pack.h" |
13 #include "ui/base/ui_base_paths.h" | 13 #include "ui/base/ui_base_paths.h" |
14 | 14 |
15 namespace ui { | 15 namespace ui { |
16 | 16 |
17 class DataPackTest | 17 class DataPackTest |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 kSampleCorruptPakSize), | 210 kSampleCorruptPakSize), |
211 static_cast<int>(kSampleCorruptPakSize)); | 211 static_cast<int>(kSampleCorruptPakSize)); |
212 | 212 |
213 // Reading asset #10 should now fail as it extends past the end of the file. | 213 // Reading asset #10 should now fail as it extends past the end of the file. |
214 ASSERT_TRUE(pack.HasResource(10)); | 214 ASSERT_TRUE(pack.HasResource(10)); |
215 ASSERT_FALSE(pack.GetStringPiece(10, &data)); | 215 ASSERT_FALSE(pack.GetStringPiece(10, &data)); |
216 } | 216 } |
217 #endif | 217 #endif |
218 | 218 |
219 } // namespace ui | 219 } // namespace ui |
OLD | NEW |