1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update script loading

This commit is contained in:
Luke Pulverenti 2015-12-03 22:59:48 -05:00
parent 31b3061157
commit 22f689e089
65 changed files with 732 additions and 6138 deletions

View file

@ -1,14 +1,11 @@
<!doctype html>
<!--
<!DOCTYPE html><!--
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
--><html><head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>paper-input tests</title>
@ -21,8 +18,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
'paper-textarea.html',
'paper-input-container.html',
'paper-input-error.html',
'paper-input-char-counter.html'
'paper-input-char-counter.html',
'paper-input.html?dom=shadow',
'paper-textarea.html?dom=shadow',
'paper-input-container.html?dom=shadow',
'paper-input-error.html?dom=shadow',
'paper-input-char-counter.html?dom=shadow'
]);
</script>
</body>
</html>
</body></html>

View file

@ -37,6 +37,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
</template>
</test-fixture>
<test-fixture id="has-tabindex">
<template>
<paper-input tabindex="0"></paper-input>
</template>
</test-fixture>
<test-fixture id="label">
<template>
<paper-input label="foo"></paper-input>
@ -211,7 +217,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
});
suite('validation', function() {
test('invalid attribute updated after calling validate()', function() {
@ -255,6 +260,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
assert.equal(input.inputElement.getAttribute('aria-describedby'), Polymer.dom(input.root).querySelector('paper-input-error').id + ' ' + Polymer.dom(input.root).querySelector('paper-input-char-counter').id, 'aria-describedby points to the error message and character counter');
});
test('focus an input with tabindex', function(done) {
var input = fixture('has-tabindex');
flush(function() {
MockInteractions.focus(input);
flush(function() {
assert.equal(input.shadowRoot ? input.shadowRoot.activeElement :
document.activeElement, input._focusableElement);
done();
});
});
});
});
</script>

View file

@ -36,6 +36,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
</template>
</test-fixture>
<test-fixture id="has-tabindex">
<template>
<paper-textarea tabindex="0"></paper-input>
</template>
</test-fixture>
<test-fixture id="label">
<template>
<paper-textarea label="foo"></paper-textarea>
@ -128,7 +134,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
var inputContent = Polymer.dom(container.root).querySelector('.input-content');
assert.isTrue(inputContent.classList.contains('label-is-floating'), 'label is floating');
});
});
suite('focus/blur events', function() {
@ -155,6 +160,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
assert.isTrue(nBlurEvents >= 1, 'blur event fired')
});
test('focus a textarea with tabindex', function(done) {
var input = fixture('has-tabindex');
flush(function() {
assert.notEqual(document.activeElement, input._focusableElement);
MockInteractions.focus(input);
setTimeout(function() {
assert.equal(document.activeElement, input.shadowRoot ? input : input._focusableElement);
done();
}, 1);
})
});
});
suite('a11y', function() {
@ -186,7 +202,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
assert.equal(input.inputElement.textarea.getAttribute('aria-describedby'), Polymer.dom(input.root).querySelector('paper-input-error').id + ' ' + Polymer.dom(input.root).querySelector('paper-input-char-counter').id, 'aria-describedby points to the error message and character counter');
});
});