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

Unified Diff: pkg/polymer/lib/elements/web-animations-js/test/testcases/auto-test-color.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/auto-test-color.html
diff --git a/pkg/polymer/lib/elements/web-animations-js/test/testcases/auto-test-color.html b/pkg/polymer/lib/elements/web-animations-js/test/testcases/auto-test-color.html
new file mode 100644
index 0000000000000000000000000000000000000000..23f3ba084c02767867eecfe5f7b986c6d6e08b13
--- /dev/null
+++ b/pkg/polymer/lib/elements/web-animations-js/test/testcases/auto-test-color.html
@@ -0,0 +1,116 @@
+<!--
+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 {
+ top: 50px;
+ width: 100px;
+ height: 100px;
+ background-color: lightsteelblue;
+ position: absolute;
+}
+
+#a {
+ left: 50px
+}
+
+#b {
+ left: 150px;
+}
+
+#c {
+ left: 250px;
+ background-color: green;
+}
+
+#d {
+ left: 350px;
+ background-color: rgba(0, 0, 0, 0);
+}
+
+#e {
+ left: 450px;
+ background-color: rgba(255, 0, 255, 0);
+}
+
+#f {
+ left: 550px
+}
+
+#g {
+ left: 650px
+}
+
+#container {
+ position: absolute;
+ left: 0px;
+ top: 50px;
+ width: 800px;
+ height: 200px;
+ background-color: green;
+}
+
+</style>
+
+All three boxes should end up the same color as the outline.
+
+<div id="container">
+ <div id="a" class="anim"></div>
+ <div id="b" class="anim"></div>
+ <div id="c" class="anim"></div>
+ <div id="d" class="anim"></div>
+ <div id="e" class="anim"></div>
+ <div id="f" class="anim"></div>
+ <div id="g" class="anim"></div>
+</div>
+
+<script>
+var expected_failures = {
+ '/Auto .*/': {
+ msie: true,
+ message: "IE returns rgba always."
+ }
+};
+</script>
+<script src="../bootstrap.js"></script>
+<script>
+"use strict";
+
+var dt = document.timeline;
+var timing = {duration: 2, fill: 'forwards'};
+
+dt.play(new Animation(document.querySelector("#a"),
+ [{backgroundColor: "red"}, {backgroundColor: "green"}], timing));
+dt.play(new Animation(document.querySelector("#b"),
+ {backgroundColor: "rgb(0, 128, 0)"}, timing));
+dt.play(new Animation(document.querySelector("#c"),
+ new KeyframeEffect([
+ {offset: 0.25, backgroundColor: "rgb(255, 0, 0)"},
+ {offset: 0.75, backgroundColor: "rgb(0, 0, 255)"},
+ ], 'add'), timing));
+dt.play(new Animation(document.querySelector("#d"),
+ {offset: 0.5, backgroundColor: "white"}, timing));
+dt.play(new Animation(document.querySelector("#e"),
+ {offset: 0.5, backgroundColor: "white"}, timing));
+
+dt.play(new Animation(document.querySelector("#f"),
+ [{backgroundColor: "#000000"}, {backgroundColor: "#ffffff"}], timing));
+
+dt.play(new Animation(document.querySelector("#g"),
+ [{backgroundColor: "#000"}, {backgroundColor: "#fff"}], timing));
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698