Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Side by Side Diff: tracing/tracing/ui/base/dropdown_test.html

Issue 1923953003: [polymer] Switches .appendChild() to Polymer.dom()...appendChild() (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2015 The Chromium Authors. All rights reserved. 3 Copyright (c) 2015 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 7
8 <link rel="import" href="/tracing/ui/base/dropdown.html"> 8 <link rel="import" href="/tracing/ui/base/dropdown.html">
9 <link rel="import" href="/tracing/ui/base/dom_helpers.html"> 9 <link rel="import" href="/tracing/ui/base/dom_helpers.html">
10 10
11 <script> 11 <script>
12 'use strict'; 12 'use strict';
13 13
14 tr.b.unittest.testSuite(function() { 14 tr.b.unittest.testSuite(function() {
15 test('basic', function() { 15 test('basic', function() {
16 var dd = document.createElement('tr-ui-b-dropdown'); 16 var dd = document.createElement('tr-ui-b-dropdown');
17 dd.style.marginLeft = '50px'; 17 dd.style.marginLeft = '50px';
18 dd.style.width = '50px'; 18 dd.style.width = '50px';
19 dd.iconElement.textContent = 'Settings ' + String.fromCharCode(0x2699); 19 dd.iconElement.textContent = 'Settings ' + String.fromCharCode(0x2699);
20 20
21 dd.appendChild(tr.ui.b.createDiv({textContent: 'item 1'})); 21 Polymer.dom(dd).appendChild(tr.ui.b.createDiv({textContent: 'item 1'}));
22 dd.appendChild(tr.ui.b.createDiv({textContent: 'item 2 longer'})); 22 Polymer.dom(dd).appendChild(
23 dd.appendChild(tr.ui.b.createDiv({textContent: 'item 3'})); 23 tr.ui.b.createDiv({textContent: 'item 2 longer'}));
24 Polymer.dom(dd).appendChild(
25 tr.ui.b.createDiv({textContent: 'item 3'}));
24 26
25 var container = tr.ui.b.createDiv(); 27 var container = tr.ui.b.createDiv();
26 container.style.height = '100px'; 28 container.style.height = '100px';
27 container.appendChild(dd); 29 Polymer.dom(container).appendChild(dd);
28 container.appendChild(tr.ui.b.createDiv({textContent: 'some text'})); 30 Polymer.dom(container).appendChild(
29 container.appendChild(tr.ui.b.createDiv({textContent: 'some more text'})); 31 tr.ui.b.createDiv({textContent: 'some text'}));
30 container.appendChild(tr.ui.b.createDiv({textContent: 'more text'})); 32 Polymer.dom(container).appendChild(
33 tr.ui.b.createDiv({textContent: 'some more text'}));
34 Polymer.dom(container).appendChild(
35 tr.ui.b.createDiv({textContent: 'more text'}));
31 this.addHTMLOutput(container); 36 this.addHTMLOutput(container);
32 37
33 dd.show(); 38 dd.show();
34 dd.close(); 39 dd.close();
35 }); 40 });
36 41
37 }); 42 });
38 </script> 43 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/ui/base/drag_handle_test.html ('k') | tracing/tracing/ui/base/hotkey_controller_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698