OLD | NEW |
1 // Copyright (C) 2012 Google Inc. All rights reserved. | 1 // Copyright (C) 2012 Google Inc. All rights reserved. |
2 // | 2 // |
3 // Redistribution and use in source and binary forms, with or without | 3 // Redistribution and use in source and binary forms, with or without |
4 // modification, are permitted provided that the following conditions are | 4 // modification, are permitted provided that the following conditions are |
5 // met: | 5 // met: |
6 // | 6 // |
7 // * Redistributions of source code must retain the above copyright | 7 // * 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 // * Redistributions in binary form must reproduce the above | 9 // * Redistributions in binary form must reproduce the above |
10 // copyright notice, this list of conditions and the following disclaimer | 10 // copyright notice, this list of conditions and the following disclaimer |
(...skipping 14 matching lines...) Expand all Loading... |
25 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
26 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 26 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
27 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
28 | 28 |
29 module('builders'); | 29 module('builders'); |
30 | 30 |
31 test('loading steps', 4, function() { | 31 test('loading steps', 4, function() { |
32 var tests = {} | 32 var tests = {} |
33 var baseUrl = 'http://dummyurl'; | 33 var baseUrl = 'http://dummyurl'; |
34 var name = 'dummyname'; | 34 var name = 'dummyname'; |
35 var master = new builders.BuilderMaster(name, baseUrl, tests); | 35 var master = new builders.BuilderMaster({name: name, url_name: name, tests:
tests); |
36 | 36 |
37 var builder = 'dummybuilder'; | 37 var builder = 'dummybuilder'; |
38 var buildNumber = 12345; | 38 var buildNumber = 12345; |
39 equal(master.logPath(builder, buildNumber), baseUrl + '/builders/' + builder
+ '/builds/' + buildNumber); | 39 equal(master.logPath(builder, buildNumber), baseUrl + '/builders/' + builder
+ '/builds/' + buildNumber); |
40 equal(master.builderJsonPath(), baseUrl + '/json/builders'); | 40 equal(master.builderJsonPath(), baseUrl + '/json/builders'); |
41 equal(master.tests, tests); | 41 equal(master.tests, tests); |
42 equal(master.name, name); | 42 equal(master.name, name); |
43 }); | 43 }); |
44 | 44 |
45 test('builders._builderFilter', 5, function() { | 45 test('builders._builderFilter', 5, function() { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 test('builders.master', 2, function() { | 92 test('builders.master', 2, function() { |
93 resetGlobals(); | 93 resetGlobals(); |
94 | 94 |
95 builders.loadBuildersList('@ToT Chromium', 'unit_tests'); | 95 builders.loadBuildersList('@ToT Chromium', 'unit_tests'); |
96 equal(builders.master('Linux Tests').basePath, 'dummyurl2'); | 96 equal(builders.master('Linux Tests').basePath, 'dummyurl2'); |
97 | 97 |
98 builders.loadBuildersList('@ToT Blink', 'unit_tests'); | 98 builders.loadBuildersList('@ToT Blink', 'unit_tests'); |
99 equal(builders.master('Linux Tests').basePath, 'dummyurl'); | 99 equal(builders.master('Linux Tests').basePath, 'dummyurl'); |
100 }); | 100 }); |
OLD | NEW |