| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 import copy | 5 import copy |
| 6 import textwrap | 6 import textwrap |
| 7 import unittest | 7 import unittest |
| 8 | 8 |
| 9 from common import dependency | 9 from common import dependency |
| 10 from common import deps_parser | 10 from common import deps_parser |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 'children': { | 368 'children': { |
| 369 } | 369 } |
| 370 }, | 370 }, |
| 371 } | 371 } |
| 372 } | 372 } |
| 373 | 373 |
| 374 | 374 |
| 375 def _Test(target_os_list, expected_deps_tree_json): | 375 def _Test(target_os_list, expected_deps_tree_json): |
| 376 root_dep = dependency.Dependency( | 376 root_dep = dependency.Dependency( |
| 377 root_dep_path, root_dep_repo_url, root_dep_revision, | 377 root_dep_path, root_dep_repo_url, root_dep_revision, |
| 378 root_dep_deps_file) | 378 deps_file=root_dep_deps_file) |
| 379 | 379 |
| 380 deps_parser.UpdateDependencyTree( | 380 deps_parser.UpdateDependencyTree( |
| 381 root_dep, target_os_list, DummyDEPSLoader(self)) | 381 root_dep, target_os_list, DummyDEPSLoader(self)) |
| 382 | 382 |
| 383 self.assertEqual(expected_deps_tree_json, root_dep.ToDict()) | 383 self.assertEqual(expected_deps_tree_json, root_dep.ToDict()) |
| 384 | 384 |
| 385 _Test(['unix'], expected_deps_tree_json_unix) | 385 _Test(['unix'], expected_deps_tree_json_unix) |
| 386 _Test(['win'], expected_deps_tree_json_win) | 386 _Test(['win'], expected_deps_tree_json_win) |
| 387 _Test(['all', 'win'], expected_deps_tree_json_all) | 387 _Test(['all', 'win'], expected_deps_tree_json_all) |
| OLD | NEW |