0cff862b1ca0517e7aacda019764e7d65d27e36f
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Tools / GardeningServer / ui / test / ct-builder-tests.html
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-builder.html">
8
9 <script>
10 (function () {
11
12 var assert = chai.assert;
13
14 describe('ct-builder', function() {
15   var builder;
16   var masterUrl = 'http://url';
17   var builderName = 'WebKit Linux (dbg)';
18   var firstFailingBuild = '1234';
19
20   beforeEach(function(done) {
21     builder = document.createElement('ct-builder');
22     builder.builder = new CTBuilder(masterUrl, builderName, firstFailingBuild);
23
24     setTimeout(done);
25   });
26
27   describe('default builder UI', function() {
28     it('should link to the builder', function() {
29       var a = builder.shadowRoot.querySelector('a');
30       assert.ok(a);
31       assert(a.href.startsWith(masterUrl));
32       assert.include(a.href, encodeURIComponent(builderName));
33       assert.include(a.href, firstFailingBuild);
34     });
35   });
36 });
37
38 })()
39 </script>