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-builder.html"> |
| 8 |
| 9 <script> |
| 10 (function () { |
| 11 |
| 12 var assert = chai.assert; |
| 13 |
| 14 describe('ct-builder', function() { |
| 15 var builder; |
| 16 |
| 17 beforeEach(function(done) { |
| 18 builder = document.createElement('ct-builder'); |
| 19 builder.builder = 'WebKit Linux (dbg)'; |
| 20 requestAnimationFrame(function() { done(); }); |
| 21 }); |
| 22 |
| 23 describe('default builder UI', function() { |
| 24 it('should link to the builder', function() { |
| 25 var a = builder.shadowRoot.querySelector('a'); |
| 26 assert.ok(a.href); |
| 27 assert.include(a.href, 'WebKit+Linux+(dbg)'); |
| 28 }); |
| 29 }); |
| 30 |
| 31 describe('builder UI with steps', function() { |
| 32 beforeEach(function(done) { |
| 33 builder.steps = ['gclient_revert', 'compile', 'unittests']; |
| 34 requestAnimationFrame(function() { done(); }); |
| 35 }); |
| 36 |
| 37 it('should link to builder and show steps', function() { |
| 38 var a = builder.shadowRoot.querySelector('a'); |
| 39 assert.ok(a); |
| 40 assert.include(a.href, 'WebKit+Linux+(dbg)'); |
| 41 assert.include(a.innerText, 'gclient_revert, compile, unittests'); |
| 42 }); |
| 43 }); |
| 44 }); |
| 45 |
| 46 })() |
| 47 </script> |
OLD | NEW |