OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright (c) 2014 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2014 The Chromium Authors. All rights reserved. |
4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
5 found in the LICENSE file. | 5 found in the LICENSE file. |
6 --> | 6 --> |
7 <link rel="import" href="/tracing/ui/base/toolbar_button.html"> | 7 <link rel="import" href="/tracing/ui/base/toolbar_button.html"> |
8 <link rel="import" href="/tracing/ui/base/dom_helpers.html"> | 8 <link rel="import" href="/tracing/ui/base/dom_helpers.html"> |
9 <script> | 9 <script> |
10 'use strict'; | 10 'use strict'; |
11 | 11 |
12 tr.b.unittest.testSuite(function() { | 12 tr.b.unittest.testSuite(function() { |
13 test('tallWithTextContent', function() { | 13 test('tallWithTextContent', function() { |
14 var el = document.createElement('tr-ui-b-toolbar-button'); | 14 var el = document.createElement('tr-ui-b-toolbar-button'); |
15 el.style.width = '100px'; | 15 el.style.width = '100px'; |
16 el.style.height = '40px'; | 16 el.style.height = '40px'; |
17 | 17 |
18 el.textContent = 'blahblah'; | 18 el.textContent = 'blahblah'; |
19 | 19 |
20 this.addHTMLOutput(el); | 20 this.addHTMLOutput(el); |
21 }); | 21 }); |
22 | 22 |
23 test('tallWithInnerSpan', function() { | 23 test('tallWithInnerSpan', function() { |
24 var el = document.createElement('tr-ui-b-toolbar-button'); | 24 var el = document.createElement('tr-ui-b-toolbar-button'); |
25 el.style.width = '100px'; | 25 el.style.width = '100px'; |
26 el.style.height = '40px'; | 26 el.style.height = '40px'; |
27 | 27 |
28 el.appendChild(tr.ui.b.createSpan({textContent: 'blahblah'})); | 28 Polymer.dom(el).appendChild(tr.ui.b.createSpan({textContent: 'blahblah'})); |
29 | 29 |
30 this.addHTMLOutput(el); | 30 this.addHTMLOutput(el); |
31 }); | 31 }); |
32 | 32 |
33 test('puny', function() { | 33 test('puny', function() { |
34 var el = document.createElement('tr-ui-b-toolbar-button'); | 34 var el = document.createElement('tr-ui-b-toolbar-button'); |
35 el.textContent = 'M'; | 35 el.textContent = 'M'; |
36 this.addHTMLOutput(el); | 36 this.addHTMLOutput(el); |
37 }); | 37 }); |
38 }); | 38 }); |
39 </script> | 39 </script> |
OLD | NEW |