blob: d88187610911ee7a0f6cbcabf553b6975f6196a7 [file] [log] [blame]
<!doctype html>
<!--
Copyright 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="/tracing/core/test_utils.html">
<link rel="import" href="/dashboard/elements/login-warning.html">
<script>
'use strict';
tr.b.unittest.testSuite(function() {
test('should be hidden when "missing" attribute is empty', function() {
var element = document.createElement('login-warning');
assert.isTrue(element.messageElement.hidden);
});
test('should become visible when "missing" attribute is set', function() {
var element = document.createElement('login-warning');
element.setAttribute('missing', 'foo');
assert.isTrue(element.messageElement.hidden);
setTimeout(function() {
assert.isFalse(element.messageElement.hidden);
}, 100);
document.body.appendChild(element);
});
});
</script>