| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 $.each(recentCommits, function(index, commitData) { | 134 $.each(recentCommits, function(index, commitData) { |
| 135 delete commitData.message; | 135 delete commitData.message; |
| 136 }); | 136 }); |
| 137 deepEqual(recentCommits, [{ | 137 deepEqual(recentCommits, [{ |
| 138 "revision": 3, | 138 "revision": 3, |
| 139 "title": "Throw SecurityError when setting 'Replaceable' propert
ies cross-origin.", | 139 "title": "Throw SecurityError when setting 'Replaceable' propert
ies cross-origin.", |
| 140 "time": "2013-09-30T20:22:01Z", | 140 "time": "2013-09-30T20:22:01Z", |
| 141 "summary": "This matches Gecko's behavior for these types of pro
perties.", | 141 "summary": "This matches Gecko's behavior for these types of pro
perties.", |
| 142 "author": "mkwst@chromium.org", | 142 "author": "mkwst@chromium.org", |
| 143 "reviewer": "jochen@chromium.org", | 143 "reviewer": "jochen@chromium.org", |
| 144 "bugID": 13, | 144 "bugID": [13], |
| 145 "revertedRevision": undefined, | 145 "revertedRevision": undefined, |
| 146 }, | 146 }, |
| 147 { | 147 { |
| 148 "revision": 2, | 148 "revision": 2, |
| 149 "title": "Fix one more layering violation caught by check-blink-
deps", | 149 "title": "Fix one more layering violation caught by check-blink-
deps", |
| 150 "time": "2013-09-30T19:36:21Z", | 150 "time": "2013-09-30T19:36:21Z", |
| 151 "summary": "core/platform may not depend on core/ even for testi
ng.", | 151 "summary": "core/platform may not depend on core/ even for testi
ng.", |
| 152 "author": "eseidel@chromium.org", | 152 "author": "eseidel@chromium.org", |
| 153 "reviewer": "abarth@chromium.org, abarth", | 153 "reviewer": "abarth@chromium.org, abarth", |
| 154 "bugID": 12, | 154 "bugID": [12], |
| 155 "revertedRevision": undefined | 155 "revertedRevision": undefined |
| 156 }, | 156 }, |
| 157 { | 157 { |
| 158 "revision": 1, | 158 "revision": 1, |
| 159 "title": "Update DEPS include_rules after addition of root-level
platform directory", | 159 "title": "Update DEPS include_rules after addition of root-level
platform directory", |
| 160 "time": "2013-09-30T19:28:49Z", | 160 "time": "2013-09-30T19:28:49Z", |
| 161 "summary": "These were all failures noticed when running check-b
link-deps", | 161 "summary": "These were all failures noticed when running check-b
link-deps", |
| 162 "author": "eseidel@chromium.org", | 162 "author": "eseidel@chromium.org", |
| 163 "reviewer": "abarth@chromium.org, abarth", | 163 "reviewer": "abarth@chromium.org, abarth", |
| 164 "bugID": 11, | 164 "bugID": [11], |
| 165 "revertedRevision": undefined | 165 "revertedRevision": undefined |
| 166 } | 166 } |
| 167 ]); | 167 ]); |
| 168 }); | 168 }); |
| 169 }).then(start); | 169 }).then(start); |
| 170 }); | 170 }); |
| 171 | 171 |
| 172 asyncTest("commitDataListForRevisionRange", 6, function() { | 172 asyncTest("commitDataListForRevisionRange", 6, function() { |
| 173 var simulator = new NetworkSimulator(); | 173 var simulator = new NetworkSimulator(); |
| 174 | 174 |
| 175 simulator.xml = function(url) | 175 simulator.xml = function(url) |
| 176 { | 176 { |
| 177 var parser = new DOMParser(); | 177 var parser = new DOMParser(); |
| 178 var responseDOM = parser.parseFromString(kExampleCommitDataXML, "applica
tion/xml"); | 178 var responseDOM = parser.parseFromString(kExampleCommitDataXML, "applica
tion/xml"); |
| 179 return Promise.resolve(responseDOM); | 179 return Promise.resolve(responseDOM); |
| 180 }; | 180 }; |
| 181 | 181 |
| 182 simulator.runTest(function() { | 182 simulator.runTest(function() { |
| 183 model.updateRecentCommits().then(function() { | 183 model.updateRecentCommits().then(function() { |
| 184 function extractBugIDs(commitData) | 184 function extractBugIDs(commitData) |
| 185 { | 185 { |
| 186 return commitData.bugID; | 186 return commitData.bugID; |
| 187 } | 187 } |
| 188 | 188 |
| 189 deepEqual(model.commitDataListForRevisionRange(3, 3).map(extractBugI
Ds), [13]); | 189 deepEqual(model.commitDataListForRevisionRange(3, 3).map(extractBugI
Ds), [[13]]); |
| 190 deepEqual(model.commitDataListForRevisionRange(1, 3).map(extractBugI
Ds), [11, 12, 13]); | 190 deepEqual(model.commitDataListForRevisionRange(1, 3).map(extractBugI
Ds), [[11], [12], [13]]); |
| 191 deepEqual(model.commitDataListForRevisionRange(0, 1).map(extractBugI
Ds), [11]); | 191 deepEqual(model.commitDataListForRevisionRange(0, 1).map(extractBugI
Ds), [[11]]); |
| 192 deepEqual(model.commitDataListForRevisionRange(0, 4).map(extractBugI
Ds), [11, 12, 13]); | 192 deepEqual(model.commitDataListForRevisionRange(0, 4).map(extractBugI
Ds), [[11], [12], [13]]); |
| 193 deepEqual(model.commitDataListForRevisionRange(4, 0).map(extractBugI
Ds), []); | 193 deepEqual(model.commitDataListForRevisionRange(4, 0).map(extractBugI
Ds), []); |
| 194 delete model.state.recentCommits; | 194 delete model.state.recentCommits; |
| 195 }); | 195 }); |
| 196 }).then(start); | 196 }).then(start); |
| 197 }); | 197 }); |
| 198 | 198 |
| 199 test("buildersInFlightForRevision", 3, function() { | 199 test("buildersInFlightForRevision", 3, function() { |
| 200 var unmock = model.state.resultsByBuilder; | 200 var unmock = model.state.resultsByBuilder; |
| 201 model.state.resultsByBuilder = { | 201 model.state.resultsByBuilder = { |
| 202 'Mr. Beasley': {blink_revision: '5'}, | 202 'Mr. Beasley': {blink_revision: '5'}, |
| (...skipping 30 matching lines...) Expand all Loading... |
| 233 'Mr. Beasley': { }, | 233 'Mr. Beasley': { }, |
| 234 'Mr Dixon': {blink_revision: '2'}, | 234 'Mr Dixon': {blink_revision: '2'}, |
| 235 'Mr. Sabatini': {blink_revision: '4'}, | 235 'Mr. Sabatini': {blink_revision: '4'}, |
| 236 'Bob': {blink_revision: '6'} | 236 'Bob': {blink_revision: '6'} |
| 237 }; | 237 }; |
| 238 equals(model.latestRevisionWithNoBuildersInFlight(), 2); | 238 equals(model.latestRevisionWithNoBuildersInFlight(), 2); |
| 239 model.state.resultsByBuilder = unmock; | 239 model.state.resultsByBuilder = unmock; |
| 240 }); | 240 }); |
| 241 | 241 |
| 242 })(); | 242 })(); |
| OLD | NEW |