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

remove unneeded components

This commit is contained in:
Luke Pulverenti 2016-05-07 17:24:10 -04:00
parent aa0ed32bb7
commit 471acf85af
197 changed files with 4 additions and 54512 deletions

View file

@ -1,28 +0,0 @@
<!DOCTYPE html><!--
@license
Copyright (c) 2015 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>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>neon-animation tests</title>
<script src="../../web-component-tester/browser.js"></script>
</head>
<body>
<script>
WCT.loadSuites([
'neon-animated-pages.html',
'neon-animated-pages.html?dom=shadow',
'neon-animated-pages-lazy.html',
'neon-animated-pages-lazy.html?dom=shadow',
'neon-animated-pages-descendant-selection.html',
'neon-animated-pages-descendant-selection.html?dom=shadow',
]);
</script>
</body></html>

View file

@ -1,118 +0,0 @@
<!DOCTYPE html>
<!--
@license
Copyright (c) 2016 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>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge,chrome=1">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<script src="../../test-fixture/test-fixture-mocha.js"></script>
<link rel="import" href="../../test-fixture/test-fixture.html">
<link rel="import" href="../../neon-animation/neon-animated-pages.html">
<link rel="import" href="../../neon-animation/neon-animation-behavior.html">
<link rel="import" href="../../iron-selector/iron-selector.html">
</head>
<body>
<test-fixture id="descendant-selection">
<template>
<neon-animated-pages entry-animation="test-animation" animate-initial-selection>
<iron-selector selected="0" id="selector">
<div>1</div>
<div id="target">2</div>
</iron-selector>
</neon-animated-pages>
</template>
</test-fixture>
<test-fixture id="selecting-item">
<template>
<neon-animated-pages entry-animation="test-animation" animate-initial-selection>
<x-selecting-element></x-selecting-element>
<div id="target"></div>
</neon-animated-pages>
</template>
</test-fixture>
<dom-module id="x-selecting-element">
<template>
<iron-selector selected="0" id="selector">
<div>1</div>
<div id="target">2</div>
</iron-selector>
</template>
</dom-module>
<dom-module id="test-element">
<template>
<neon-animated-pages entry-animation="test-animation" animate-initial-selection>
<content></content>
</neon-animated-pages>
</template>
</dom-module>
<script>
HTMLImports.whenReady(function() {
Polymer({ is: 'x-selecting-element' });
Polymer({ is: 'test-element' });
Polymer({
is: 'test-animation',
behaviors: [
Polymer.NeonAnimationBehavior
],
configure: function(config) {
config.node.animated = true;
}
});
});
</script>
<test-fixture id="distributed-children">
<template>
<test-element>
<div>1</div>
<div id="target">2</div>
</test-element>
</template>
</test-fixture>
<script>
suite('descendant selection', function() {
test('descendents of other selectors are not animated', function() {
var animatedPages = fixture('descendant-selection');
var selector = Polymer.dom(animatedPages).querySelector('#selector');
var target = Polymer.dom(animatedPages).querySelector('#target');
Polymer.dom(selector).setAttribute('selected', '1');
assert(!target.animated);
});
test('elements distributed as children are animated', function() {
var testElement = fixture('distributed-children');
var target = Polymer.dom(testElement).querySelector('#target');
var animatedPages = Polymer.dom(testElement.root).querySelector("neon-animated-pages");
Polymer.dom(animatedPages).setAttribute('selected', '1');
assert(target.animated);
});
test('ignores selection from shadow descendants of its items', function() {
var pages = fixture('selecting-item');
var target = Polymer.dom(pages).querySelector('#target');
var selecting = Polymer.dom(pages).querySelector('x-selecting-element');
selecting.$.selector.selected = 1;
assert(!target.animated);
});
});
</script>
</body>
</html>

View file

@ -1,74 +0,0 @@
<!doctype html>
<!--
@license
Copyright (c) 2016 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>
<title>neon-animated-pages tests</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<script>Polymer = {lazyRegister: true}</script>
<script src="../../web-component-tester/browser.js"></script>
<script src="../../test-fixture/test-fixture-mocha.js"></script>
<link rel="import" href="../../test-fixture/test-fixture.html">
<link rel="import" href="../neon-animated-pages.html">
<link rel="import" href="../neon-animatable.html">
<link rel="import" href="../animations/slide-from-left-animation.html">
<link rel="import" href="../animations/slide-right-animation.html">
<link rel="import" href="test-resizable-pages.html">
</head>
<body>
<test-fixture id="animate-initial-selection">
<template>
<neon-animated-pages entry-animation="slide-from-left-animation" exit-animation="slide-right-animation" animate-initial-selection>
<neon-animatable></neon-animatable>
<neon-animatable></neon-animatable>
</neon-animated-pages>
</template>
</test-fixture>
<script>
suite('animations found when `lazRegister` setting is true', function() {
test('animations are registered', function(done) {
var animatedPages = fixture('animate-initial-selection');
animatedPages._completeAnimations = sinon.spy();
assert.isUndefined(animatedPages.selected);
var pages = Polymer.dom(animatedPages).children;
animatedPages.addEventListener('neon-animation-finish', function(event) {
if (animatedPages.selected === 0) {
animatedPages.selected = 1;
return;
}
assert.strictEqual(animatedPages.selected, 1);
assert.equal(event.detail.fromPage, pages[0]);
assert.equal(event.detail.toPage, pages[1]);
assert.isTrue(animatedPages._completeAnimations.calledTwice);
var a$ = animatedPages._completeAnimations.getCall(1).args[0];
assert.isTrue(a$[0].animation.isNeonAnimation, 'default animation is not a registered animation');
assert.isTrue(a$[1].animation.isNeonAnimation, 'entry animation is not a registered animation');
assert.isTrue(a$[2].animation.isNeonAnimation, 'exit animation is not a registered animation');
done();
});
animatedPages.selected = 0;
});
});
</script>
</body>
</html>

View file

@ -1,101 +0,0 @@
<!doctype html>
<!--
@license
Copyright (c) 2015 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>
<title>neon-animated-pages tests</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<script src="../../test-fixture/test-fixture-mocha.js"></script>
<link rel="import" href="../../test-fixture/test-fixture.html">
<link rel="import" href="../neon-animated-pages.html">
<link rel="import" href="../neon-animatable.html">
<link rel="import" href="../animations/slide-from-left-animation.html">
<link rel="import" href="../animations/slide-right-animation.html">
<link rel="import" href="test-resizable-pages.html">
</head>
<body>
<test-fixture id="basic">
<template>
<neon-animated-pages>
</neon-animated-pages>
</template>
</test-fixture>
<test-fixture id="notify-resize">
<template>
<neon-animated-pages>
<a-resizable-page></a-resizable-page>
<b-resizable-page></b-resizable-page>
<c-resizable-page></c-resizable-page>
</neon-animated-pages>
</template>
</test-fixture>
<test-fixture id="animate-initial-selection">
<template>
<neon-animated-pages entry-animation="slide-from-left-animation" exit-animation="slide-right-animation" animate-initial-selection>
<neon-animatable></neon-animatable>
<neon-animatable></neon-animatable>
</neon-animated-pages>
</template>
</test-fixture>
<script>
suite('basic', function() {
});
suite('notify-resize', function() {
test('only a destination page recieves a resize event', function(done) {
var animatedPages = fixture('notify-resize');
var resizables = Polymer.dom(animatedPages).children;
var recieves = {};
resizables.forEach(function(page) {
page.addEventListener('iron-resize', function(event) {
var pageName = event.currentTarget.tagName;
recieves[pageName] = pageName in recieves ? recieves[pageName] + 1 : 1;
});
});
animatedPages.selected = 2;
setTimeout(function() {
assert.deepEqual(recieves, {
'C-RESIZABLE-PAGE': 1
});
done();
}, 50);
});
});
suite('animate-initial-selection', function() {
test('\'neon-animation-finish\' event fired after animating initial selection', function(done) {
var animatedPages = fixture('animate-initial-selection');
assert.isUndefined(animatedPages.selected);
var pages = Polymer.dom(animatedPages).children;
animatedPages.addEventListener('neon-animation-finish', function(event) {
assert.strictEqual(animatedPages.selected, 0);
assert.isFalse(event.detail.fromPage);
assert.deepEqual(event.detail.toPage, pages[0]);
done();
});
animatedPages.selected = 0;
});
});
</script>
</body>
</html>

View file

@ -1,58 +0,0 @@
<!--
@license
Copyright (c) 2015 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
-->
<link rel="import" href="../../polymer/polymer.html">
<link rel="import" href="../neon-shared-element-animatable-behavior.html">
<link rel="import" href="../../iron-resizable-behavior/iron-resizable-behavior.html">
<dom-module id="a-resizable-page">
<template>
</template>
</dom-module>
<dom-module id="b-resizable-page">
<template>
</template>
</dom-module>
<dom-module id="c-resizable-page">
<template>
</template>
</dom-module>
<script>
(function() {
Polymer({
is: 'a-resizable-page',
behaviors: [
Polymer.NeonSharedElementAnimatableBehavior,
Polymer.IronResizableBehavior
]
});
Polymer({
is: 'b-resizable-page',
behaviors: [
Polymer.NeonSharedElementAnimatableBehavior,
Polymer.IronResizableBehavior
]
});
Polymer({
is: 'c-resizable-page',
behaviors: [
Polymer.NeonSharedElementAnimatableBehavior,
Polymer.IronResizableBehavior
]
});
})();
</script>