Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: bower_components/web-animations-js/test/testcases/auto-test-transform-functions.html

Issue 786953007: npm_modules: Fork bower_components into Polymer 0.4.0 and 0.5.0 versions (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: bower_components/web-animations-js/test/testcases/auto-test-transform-functions.html
diff --git a/bower_components/web-animations-js/test/testcases/auto-test-transform-functions.html b/bower_components/web-animations-js/test/testcases/auto-test-transform-functions.html
deleted file mode 100644
index 392ef822bfa1966136f0db6fd70eec6d2657a300..0000000000000000000000000000000000000000
--- a/bower_components/web-animations-js/test/testcases/auto-test-transform-functions.html
+++ /dev/null
@@ -1,158 +0,0 @@
-<!--
-Copyright 2012 Google Inc. All Rights Reserved.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-
-<!DOCTYPE html><meta charset="UTF-8">
-<style>
-.container {
- -webkit-perspective: 400px;
- perspective: 400px;
- position: absolute;
- top: 10px;
-}
-.box {
- display: inline-block;
- width: 100px;
- height: 100px;
- margin: 16px;
- border-style: solid;
- white-space: pre;
-}
-.test {
- border-color: green;
-}
-.expectation {
- color: red;
-}
-</style>
-
-<div id="spacer"></div>
-<div id="expectationContainer" class="container"></div>
-<div id="testContainer" class="container"></div>
-
-<script src="../bootstrap.js"></script>
-<script>
-"use strict";
-var testGroups = [
- [
- 'matrix3d(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1)',
- 'matrix(0.7, 0.7, -0.7, 0.7, 10, 20)',
- 'matrix3d(0,0,-1,0, 0,1,0,0, 1,0,0,0, 0,0,0,1)',
- ], [
- 'skew(20deg, 30deg)',
- 'skewX(40deg)',
- 'skewY(30deg)',
- ], [
- 'scale(1.5, 2)',
- 'scaleX(2)',
- 'scaleY(1.5)',
- 'scaleZ(2) translateZ(4px)',
- ], [
- 'rotate(60deg)',
- 'rotateX(70deg)',
- 'rotateY(80deg)',
- 'rotateZ(70deg)',
- 'rotate3d(1, 1, 1, 60deg)',
- ], [
- 'translate(10px, 20px)',
- 'translateX(10px)',
- 'translateY(20px)',
- 'translateZ(30px)',
- 'translate3d(10px, 20px, 40px)',
- ], [
- 'translate(100px)',
- 'translate(100px) rotate(20deg)',
- 'translate(100px) rotate(20deg) matrix(0.7, 0.7, -0.7, 0.7, 0, 0)',
- 'translate(100px) rotate(20deg) scale(0.5)',
- ]
-];
-
-var animations = [];
-var style = document.createElement('style');
-var count = 0;
-var showExpectations = inExploreMode();
-var expectationStarters = [];
-
-function addAnimationTest(from, to) {
- var testElement = document.createElement('div');
- testElement.classList.add('box', 'test');
- testContainer.appendChild(testElement);
- testElement.textContent = from + '\n' + to;
- animations.push(new Animation(testElement, [
- {transform: from},
- {transform: to},
- ], {
- duration: 1 * 1000,
- direction: 'alternate',
- iterations: Infinity,
- easing: 'ease-in-out',
- }));
-
- if (!showExpectations) {
- return;
- }
- var expectationElement = document.createElement('div');
- expectationElement.classList.add('box', 'expectation');
- expectationElement.textContent = from + '\n' + to;
- var currentCount = count;
- expectationStarters.push(function() {
- expectationElement.classList.add('animation' + currentCount);
- });
- expectationContainer.appendChild(expectationElement);
- var keyframes = ' animation' + count + '{' +
- 'from{-webkit-transform:' + from + ';transform:' + from +';}' +
- 'to{-webkit-transform:' + to + ';transform:' + to +';}}';
- var animation = 'animation' + count + ' 1s alternate infinite ease-in-out';
- style.textContent += '@-webkit-keyframes' + keyframes + '\n';
- style.textContent += '@keyframes' + keyframes + '\n';
- style.textContent += '.animation' + count +'{-webkit-animation:' + animation + ';animation:' + animation + ';}\n';
- count++;
-}
-
-function addBreak() {
- testContainer.appendChild(document.createElement('hr'));
- if (showExpectations) {
- expectationContainer.appendChild(document.createElement('hr'));
- }
-}
-
-function addTestGroup(tests) {
- tests.forEach(function(transform) {
- addAnimationTest('none', transform);
- });
- tests.forEach(function(transform, i) {
- addAnimationTest(transform, tests[(i + 1) % tests.length]);
- });
- addBreak();
-}
-
-testGroups.forEach(addTestGroup);
-
-if (showExpectations) {
- expectationContainer.appendChild(style);
- var startExpectations = function() {
- expectationStarters.forEach(function(f) {f();});
- };
- if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
- requestAnimationFrame(startExpectations);
- } else {
- startExpectations();
- }
-}
-// TODO: Make infinite duration groups work.
-animations.forEach(function(animation) {document.timeline.play(animation);});
-
-spacer.style.height = testContainer.clientHeight + 'px';
-</script>

Powered by Google App Engine
This is Rietveld 408576698