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 "chrome/common/web_apps.h" | 5 #include "chrome/common/web_apps.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/json/json_file_value_serializer.h" | 9 #include "base/json/json_file_value_serializer.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "chrome/common/chrome_paths.h" | 14 #include "chrome/common/chrome_paths.h" |
15 #include "chrome/common/json_schema_validator.h" | 15 #include "chrome/common/json_schema/json_schema_validator.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 DictionaryValue* LoadDefinitionFile(const std::string& name) { | 20 DictionaryValue* LoadDefinitionFile(const std::string& name) { |
21 base::FilePath path; | 21 base::FilePath path; |
22 if (!PathService::Get(chrome::DIR_TEST_DATA, &path)) { | 22 if (!PathService::Get(chrome::DIR_TEST_DATA, &path)) { |
23 ADD_FAILURE() << "Could not get test data dir."; | 23 ADD_FAILURE() << "Could not get test data dir."; |
24 return NULL; | 24 return NULL; |
25 } | 25 } |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 ASSERT_EQ(data[i].width1, sizes[0].width()); | 183 ASSERT_EQ(data[i].width1, sizes[0].width()); |
184 ASSERT_EQ(data[i].height1, sizes[0].height()); | 184 ASSERT_EQ(data[i].height1, sizes[0].height()); |
185 } | 185 } |
186 if (sizes.size() > 1) { | 186 if (sizes.size() > 1) { |
187 ASSERT_EQ(data[i].width2, sizes[1].width()); | 187 ASSERT_EQ(data[i].width2, sizes[1].width()); |
188 ASSERT_EQ(data[i].height2, sizes[1].height()); | 188 ASSERT_EQ(data[i].height2, sizes[1].height()); |
189 } | 189 } |
190 } | 190 } |
191 } | 191 } |
192 } | 192 } |
OLD | NEW |