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

Unified Diff: pkg/polymer/lib/elements/web-animations-js/test/testcases/disabled-auto-test-position-list-type.html

Issue 175443005: [polymer] import all elements (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: updated from bower Created 6 years, 10 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: pkg/polymer/lib/elements/web-animations-js/test/testcases/disabled-auto-test-position-list-type.html
diff --git a/pkg/polymer/lib/elements/web-animations-js/test/testcases/disabled-auto-test-position-list-type.html b/pkg/polymer/lib/elements/web-animations-js/test/testcases/disabled-auto-test-position-list-type.html
new file mode 100644
index 0000000000000000000000000000000000000000..db84548e2bc7a4d385e5df96027f31d3a125625b
--- /dev/null
+++ b/pkg/polymer/lib/elements/web-animations-js/test/testcases/disabled-auto-test-position-list-type.html
@@ -0,0 +1,103 @@
+<!--
+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>
+.anim {
+ width: 200px;
+ height: 200px;
+ display: inline-block;
+ border-style: solid;
+ font-weight: bold;
+ border-color: white;
+ color: white;
+ background-color: #888;
+ background-repeat: no-repeat;
+}
+</style>
+
+All divs should end up with a green block in the top left corner.
+<div id="container"></div>
+
+<script src="../bootstrap.js"></script>
+<script>
+"use strict";
+
+function generateGridLinesURI(size) {
+ var canvas = document.createElement('canvas');
+ canvas.width = size;
+ canvas.height = size;
+ var context = canvas.getContext('2d');
+
+ context.fillStyle = 'green';
+ context.fillRect(0.5, 0.5, size - 1, size - 1);
+
+ context.lineWidth = 2;
+ context.strokeStyle = 'black';
+ context.strokeRect(1, 1, size - 2, size - 2);
+
+ return canvas.toDataURL();
+}
+var backgroundImage = 'url(' + generateGridLinesURI(150) + ')';
+
+var startPosition = '0% 0%';
+var endPositions = [
+ 'left',
+ 'center',
+ 'right',
+ 'top',
+ 'bottom',
+ '10px',
+ '20%',
+ 'center left',
+ 'center center',
+ 'right bottom',
+ 'right 25%',
+ '10px bottom',
+ '10px 40px',
+ 'left bottom 10px',
+ 'center top 20%',
+ 'right top 10px',
+ 'right bottom 80%',
+ 'right 80% bottom',
+ 'bottom left 10px',
+ 'left 40px bottom 10px',
+ 'left 20% top 20%',
+ 'calc(25% - 5px)',
+ 'calc(25% - 5px) 25%',
+ 'top calc(25% - 5px) center',
+ 'bottom left 10px',
+ 'bottom calc(25% - 5px) right',
+ 'left 10px bottom 10px',
+ 'left 25% top 25%',
+ 'left calc(25% - 5px) top 10px',
+ 'top 10px right calc(25% - 5px)',
+ 'bottom calc(25% - 5px) left 10px',
+];
+
+for (var i = 0; i < endPositions.length; i++) {
+ var endPosition = endPositions[i];
+ var pre = document.createElement('pre');
+ pre.style.backgroundImage = backgroundImage;
+ pre.className = 'anim';
+ pre.innerText = 'background-position:\nfrom: ' + startPosition + '\nto: ' + endPosition;
+ document.querySelector('#container').appendChild(pre);
+ document.timeline.play(new Animation(pre, new KeyframeEffect([
+ { backgroundPosition: startPosition },
+ { backgroundPosition: endPosition },
+ ]), { duration:2, easing: 'ease-in'}));
+}
+</script>

Powered by Google App Engine
This is Rietveld 408576698