blob: d2bf24c337b5ba022bce6dda59b80f054596fc6e [file] [log] [blame]
<!DOCTYPE html>
<!--
Copyright (c) 2015 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="/base/ui/dropdown.html">
<link rel="import" href="/base/ui/dom_helpers.html">
<script>
'use strict';
tr.b.unittest.testSuite(function() {
test('basic', function() {
var dd = document.createElement('tr-b-ui-dropdown');
dd.style.marginLeft = '50px';
dd.style.width = '50px';
dd.iconElement.textContent = 'Settings ' + String.fromCharCode(0x2699);
dd.appendChild(tr.b.ui.createDiv({textContent: 'item 1'}));
dd.appendChild(tr.b.ui.createDiv({textContent: 'item 2 longer'}));
dd.appendChild(tr.b.ui.createDiv({textContent: 'item 3'}));
var container = tr.b.ui.createDiv();
container.style.height = '100px';
container.appendChild(dd);
container.appendChild(tr.b.ui.createDiv({textContent: 'some text'}));
container.appendChild(tr.b.ui.createDiv({textContent: 'some more text'}));
container.appendChild(tr.b.ui.createDiv({textContent: 'more text'}));
this.addHTMLOutput(container);
dd.show();
dd.close();
});
});
</script>