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

Side by Side Diff: third_party/polymer/components/web-animations-js/test/testcases/auto-test-motion-path.html

Issue 592603004: Revert "Polymer elements added to third_party/polymer." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!--
2 Copyright 2012 Google Inc. All Rights Reserved.
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15 -->
16
17 <!DOCTYPE html><meta charset="UTF-8">
18 <style>
19 .animation {
20 position: absolute;
21 width: 25px;
22 height: 25px;
23 top: 0px;
24 left: 0px;
25 background: lightsteelblue;
26 }
27 .expectation {
28 background: red;
29 position: absolute;
30 width: 25px;
31 height: 25px;
32 top: 0px;
33 left: 0px;
34 }
35 #eTR {
36 -webkit-transform: translate(387.5px, 87.5px);
37 transform: translate(387.5px, 87.5px);
38 }
39 #eBL {
40 -webkit-transform: translate(87.5px, 287.5px);
41 transform: translate(87.5px, 287.5px);
42 }
43 #eBR, #animBR {
44 -webkit-transform: translate(387.5px, 287.5px);
45 transform: translate(387.5px, 287.5px);
46 }
47 svg {
48 position:absolute;
49 top: 0px;
50 left: 0px;
51 width: 800px;
52 height: 600px;
53 }
54 </style>
55
56 <svg xmlns="http://www.w3.org/2000/svg" version="1.1">
57 <path id=pathTR d="M400,100l0,0l0,-50l100,0l86.3325,122.665z" />
58 <path d="M400,100l0,0l0,-50l100,0l86.3325,122.665z" stroke="black"
59 stroke-width="1" fill="none" />
60 <path id=pathBL d="M100,300l0,0l0,-50l100,0l86.3325,122.665z" />
61 <path d="M100,300l0,0l0,-50l100,0l86.3325,122.665z" stroke="black"
62 stroke-width="1" fill="none" />
63 <path id=pathBR d="M400,300l0,0l0,-50l100,0l86.3325,122.665z" />
64 <path d="M400,300l0,0l0,-50l100,0l86.3325,122.665z" stroke="black"
65 stroke-width="1" fill="none" />
66 </svg>
67
68 <div id="eTR" class="expectation"></div>
69 <div id="animTR" class="animation">&rarr;</div>
70 <div id="eBL" class="expectation"></div>
71 <div id="animBL" class="animation">&rarr;</div>
72 <div id="eBR" class="expectation"></div>
73 <div id="animBR" class="animation">&rarr;</div>
74
75 <script>
76 var expected_failures = [
77 {
78 browser_configurations: [{ firefox: true }],
79 tests: [
80 '#animTR at t=(0|(1|2|10|11)000)ms',
81 '#animBL at t=(0|(7|8|10)000)ms',
82 '#animBR at t=(0|10000)ms',
83 ],
84 message: 'Doesn\'t quite follow path correctly.',
85 }, {
86 browser_configurations: [{ firefox: true, version: '29|30|31' }],
87 tests: [
88 '#animTR at t=9000ms',
89 '#animBL at t=5000ms',
90 '#animBR at t=(3|8|9)000ms',
91 ],
92 message: 'Doesn\'t quite follow path correctly.',
93 }, {
94 browser_configurations: [{ msie: true }],
95 tests: [
96 '#animTR at t=(0|(1|2|3|4|9|10|11)000)ms',
97 '#animBL at t=(0|(1|3|4|7|8|10|11)000)ms',
98 '#animBR at t=(0|(1|3|9|10|11)000)ms',
99 ],
100 message: 'Doesn\'t quite follow path correctly.',
101 }
102 ];
103 </script>
104 <script src="../bootstrap.js"></script>
105 <script>
106 "use strict";
107
108 var animFuncTR = new MotionPathEffect(
109 document.querySelector('#pathTR').pathSegList, 'auto-rotate');
110 document.timeline.play(new Animation(document.querySelector("#animTR"),
111 animFuncTR, {duration: 10 * 1000, iterations: 2}));
112
113 var animFuncBL = new MotionPathEffect(
114 document.querySelector('#pathBL').pathSegList, 'auto-rotate');
115 document.timeline.play(new Animation(
116 document.querySelector("#animBL"), animFuncBL,
117 {duration: 10 * 1000, iterations: 2, easing: "paced"}));
118
119 var animFuncBRKeyFrames = new KeyframeEffect(
120 [{transform: "translate(387.5px, 287.5px) rotate(180deg)"}], "replace");
121 var animFuncBRPath = new MotionPathEffect(
122 document.querySelector('#pathBR').pathSegList, 'auto-rotate');
123 var animBR = new Animation(document.querySelector("#animBR"), animFuncBRPath,
124 {duration: 10 * 1000, iterations: 2, easing: "paced"});
125 document.timeline.play(animBR);
126
127 testharness_timeline.schedule(function() {
128 animBR.effect = animFuncBRKeyFrames;
129 }, 3000);
130 testharness_timeline.schedule(function() {
131 animBR.effect = animFuncBRPath;
132 }, 6000);
133 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698