OLD | NEW |
(Empty) | |
| 1 <!-- |
| 2 Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 Use of this source code is governed by a BSD-style license that can be |
| 4 found in the LICENSE file. |
| 5 --> |
| 6 |
| 7 <link rel="import" href="ct-commit-log.html"> |
| 8 |
| 9 <link rel='import' href='ct-commit-mock.html'> |
| 10 |
| 11 <script> |
| 12 (function () { |
| 13 |
| 14 module("ct-commit-log"); |
| 15 |
| 16 test("basic", 1, function() { |
| 17 var commit = new CTCommitMock(); |
| 18 var kExampleCommitDataXML = |
| 19 "<feed xmlns='http://www.w3.org/2005/Atom'>\n" + |
| 20 "<title>blink, branch master</title>\n" + |
| 21 "<subtitle>Mirror of the Chromium Blink repository.</subtitle>\n" + |
| 22 "<link rel='alternate' type='text/html' href='http://blink.lc/blink/'/>\n"
+ |
| 23 "<entry>\n" + |
| 24 "<title>Throw SecurityError when setting 'Replaceable' properties cross-or
igin.</title>\n" + |
| 25 "<updated>2013-09-30T20:22:01Z</updated>\n" + |
| 26 "<author>\n" + |
| 27 "<name>" + commit.author + "</name>\n" + |
| 28 "</author>\n" + |
| 29 "<published>2013-09-30T20:22:01Z</published>\n" + |
| 30 "<link rel='alternate' type='text/html' href='http://blink.lc/blink/commit
/?id=723e62a4a4e093435b4772b4839aa3fd7cf6b991'/>\n" + |
| 31 "<id>723e62a4a4e093435b4772b4839aa3fd7cf6b991</id>\n" + |
| 32 "<content type='text'>\n" + commit.message + "</content>\n"; |
| 33 |
| 34 var xml = new DOMParser().parseFromString(kExampleCommitDataXML, "text/xml"); |
| 35 var log = new CTCommitLog(); |
| 36 log._processXml(xml); |
| 37 |
| 38 var expectedCommits = {}; |
| 39 expectedCommits[commit.revision] = commit; |
| 40 deepEqual(log.commits, expectedCommits); |
| 41 }); |
| 42 |
| 43 })(); |
| 44 </script> |
OLD | NEW |