| 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 base64 | 5 import base64 |
| 6 from datetime import datetime | 6 from datetime import datetime |
| 7 import json | 7 import json |
| 8 import re | 8 import re |
| 9 | 9 |
| 10 from testing_utils import testing | 10 from testing_utils import testing |
| 11 | 11 |
| 12 from common import git_repository | 12 from gitiles import git_repository |
| 13 from gitiles.change_log import ChangeLog |
| 14 # TODO(wrengr): we shouldn't have anything in the gitiles directory |
| 15 # depend on stuff in the common directory. |
| 13 from common import retry_http_client | 16 from common import retry_http_client |
| 14 from common.change_log import ChangeLog | |
| 15 | 17 |
| 16 | 18 |
| 17 COMMIT_MESSAGE = ('Add popover for snapshot canvas log.\n\n' | 19 COMMIT_MESSAGE = ('Add popover for snapshot canvas log.\n\n' |
| 18 'Review URL: https://codereview.chromium.org/320423004\n\n' | 20 'Review URL: https://codereview.chromium.org/320423004\n\n' |
| 19 'Review URL: https://codereview.chromium.org/328113005\n\n' | 21 'Review URL: https://codereview.chromium.org/328113005\n\n' |
| 20 'Cr-Commit-Position: refs/heads/master@{#175976}') | 22 'Cr-Commit-Position: refs/heads/master@{#175976}') |
| 21 | 23 |
| 22 COMMIT_LOG = """)]}' | 24 COMMIT_LOG = """)]}' |
| 23 { | 25 { |
| 24 "commit": "bcfd5a12eea05588aee98b7cf7e032d8cb5b58bb", | 26 "commit": "bcfd5a12eea05588aee98b7cf7e032d8cb5b58bb", |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 return {'log': [log2]} | 561 return {'log': [log2]} |
| 560 | 562 |
| 561 return {'log': [log1], 'next': 'next_page_commit'} | 563 return {'log': [log1], 'next': 'next_page_commit'} |
| 562 | 564 |
| 563 self.mock(git_repository.GitRepository, '_SendRequestForJsonResponse', | 565 self.mock(git_repository.GitRepository, '_SendRequestForJsonResponse', |
| 564 _MockSendRequestForJsonResponse) | 566 _MockSendRequestForJsonResponse) |
| 565 | 567 |
| 566 changelogs = self.git_repo.GetChangeLogs('0', '2') | 568 changelogs = self.git_repo.GetChangeLogs('0', '2') |
| 567 | 569 |
| 568 self.assertEqual(len(changelogs), 2) | 570 self.assertEqual(len(changelogs), 2) |
| OLD | NEW |