blob: 99cc4e4dfa73b5d149535812af8088c5c8ee5e06 [file] [log] [blame]
Chris Craik44c28202015-05-12 17:25:16 -07001<!DOCTYPE html>
2<!--
3Copyright (c) 2015 The Chromium Authors. All rights reserved.
4Use of this source code is governed by a BSD-style license that can be
5found in the LICENSE file.
6-->
7
8<link rel="import" href="/base/ui/dropdown.html">
9<link rel="import" href="/base/ui/dom_helpers.html">
10
11<script>
12'use strict';
13
14tv.b.unittest.testSuite(function() {
15 test('basic', function() {
16 var dd = document.createElement('tv-b-dropdown');
17 dd.style.marginLeft = '50px';
18 dd.style.width = '50px';
19 dd.iconElement.textContent = 'Settings ' + String.fromCharCode(0x2699);
20
21 dd.appendChild(tv.b.ui.createDiv({textContent: 'item 1'}));
22 dd.appendChild(tv.b.ui.createDiv({textContent: 'item 2 longer'}));
23 dd.appendChild(tv.b.ui.createDiv({textContent: 'item 3'}));
24
25 var container = tv.b.ui.createDiv();
26 container.style.height = '100px';
27 container.appendChild(dd);
28 container.appendChild(tv.b.ui.createDiv({textContent: 'some text'}));
29 container.appendChild(tv.b.ui.createDiv({textContent: 'some more text'}));
30 container.appendChild(tv.b.ui.createDiv({textContent: 'more text'}));
31 this.addHTMLOutput(container);
32
33 dd.show();
34 dd.close();
35 });
36
37});
38</script>