1<!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="/tracing/ui/base/dropdown.html">
9<link rel="import" href="/tracing/ui/base/dom_helpers.html">
10
11<script>
12'use strict';
13
14tr.b.unittest.testSuite(function() {
15  test('basic', function() {
16    var dd = document.createElement('tr-ui-b-dropdown');
17    dd.style.marginLeft = '50px';
18    dd.style.width = '50px';
19    dd.iconElement.textContent = 'Settings ' + String.fromCharCode(0x2699);
20
21    dd.appendChild(tr.ui.b.createDiv({textContent: 'item 1'}));
22    dd.appendChild(tr.ui.b.createDiv({textContent: 'item 2 longer'}));
23    dd.appendChild(tr.ui.b.createDiv({textContent: 'item 3'}));
24
25    var container = tr.ui.b.createDiv();
26    container.style.height = '100px';
27    container.appendChild(dd);
28    container.appendChild(tr.ui.b.createDiv({textContent: 'some text'}));
29    container.appendChild(tr.ui.b.createDiv({textContent: 'some more text'}));
30    container.appendChild(tr.ui.b.createDiv({textContent: 'more text'}));
31    this.addHTMLOutput(container);
32
33    dd.show();
34    dd.close();
35  });
36
37});
38</script>
39