| Index: pkg/polymer/lib/elements/web-animations-js/test/testcases/auto-test-shorthand.html
|
| diff --git a/pkg/polymer/lib/elements/web-animations-js/test/testcases/auto-test-shorthand.html b/pkg/polymer/lib/elements/web-animations-js/test/testcases/auto-test-shorthand.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..44771256949281c3c1353866da69e33dc432f20f
|
| --- /dev/null
|
| +++ b/pkg/polymer/lib/elements/web-animations-js/test/testcases/auto-test-shorthand.html
|
| @@ -0,0 +1,118 @@
|
| +<!--
|
| +Copyright 2013 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-column-width: 250px;
|
| + -moz-column-width: 250px;
|
| + column-width: 250px;
|
| +}
|
| +
|
| +p {
|
| + display: inline-block;
|
| +}
|
| +
|
| +.test, .ref {
|
| + background-color: lightsteelblue;
|
| + display: inline-block;
|
| + width: 100px;
|
| + height: 100px;
|
| + margin-right: 10px;
|
| +}
|
| +
|
| +#borderWidth, #borderColor {
|
| + border-style: solid;
|
| +}
|
| +#borderWidth {
|
| + border-color: green;
|
| +}
|
| +
|
| +</style>
|
| +<script>
|
| +var expected_failures = {
|
| + '/#font at t=(0|0.5|1|1.5)s/': {
|
| + firefox: true,
|
| + message: "Floating point issues."
|
| + },
|
| + '/#background at t=(0|0.5|1|1.5|2)s/': {
|
| + firefox: true,
|
| + message: "Setting background to 'auto' gets back 'auto auto'"
|
| + },
|
| + '#font at t=2s': {
|
| + firefox: true,
|
| + message: "Floating point issues."
|
| + },
|
| + '/#((?!(borderWidth|borderRadius|margin|padding)).*) at t=(0|0.5|1|1.5|2)s/': {
|
| + msie: true,
|
| + message: "IE returns rgba."
|
| + },
|
| + '/#borderWidth at t=(0.5|1|1.5)s/': {
|
| + msie: true,
|
| + message: "IE returns rgba."
|
| + },
|
| + '/#font at t=(.*)s/': {
|
| + chrome: ["31.0", "30.0"],
|
| + }
|
| +};
|
| +</script>
|
| +<script src="../bootstrap.js"></script>
|
| +<div id="container"></div>
|
| +<script>
|
| +"use strict";
|
| +
|
| +var testCases = {
|
| + background: 'url(background.png) 50% 25% repeat-y green',
|
| + border: 'green solid 4px',
|
| + borderColor: 'lime lightgreen darkgreen green',
|
| + borderLeft: 'green solid 4px',
|
| + borderRight: 'green solid 4px',
|
| + borderTop: 'green solid 4px',
|
| + borderBottom: 'green solid 4px',
|
| + borderRadius: '10px 20px 10% 50%',
|
| + borderWidth: 'thin medium thick 10px',
|
| + font: 'italic bold 20pt / 200% serif',
|
| + margin: '5px 10px 15px 20px',
|
| + outline: 'green solid 5px',
|
| + padding: '5px 10px 15px 20px',
|
| +};
|
| +
|
| +var container = document.querySelector('#container');
|
| +
|
| +for (var shorthand in testCases) {
|
| + var p = document.createElement('p');
|
| + var value = testCases[shorthand];
|
| + p.appendChild(document.createTextNode(shorthand));
|
| + p.appendChild(document.createElement('br'));
|
| + var refDiv = document.createElement('div');
|
| + refDiv.id = shorthand;
|
| + refDiv.style[shorthand] = value;
|
| + refDiv.className = 'ref';
|
| + refDiv.appendChild(document.createTextNode('Ref'));
|
| + p.appendChild(refDiv);
|
| + var testDiv = document.createElement('div');
|
| + testDiv.id = shorthand;
|
| + testDiv.className = 'test';
|
| + testDiv.appendChild(document.createTextNode('Test'));
|
| + p.appendChild(testDiv);
|
| + container.appendChild(p);
|
| +
|
| + var keyframe = {};
|
| + keyframe[shorthand] = value;
|
| + document.timeline.play(new Animation(testDiv, [keyframe], {duration: 2, fill: 'forwards'}));
|
| +}
|
| +
|
| +</script>
|
|
|