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

Unified Diff: polymer_0.5.0/bower_components/web-animations-js/test/blink/keyframe-properties.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, 12 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: polymer_0.5.0/bower_components/web-animations-js/test/blink/keyframe-properties.html
diff --git a/polymer_0.5.0/bower_components/web-animations-js/test/blink/keyframe-properties.html b/polymer_0.5.0/bower_components/web-animations-js/test/blink/keyframe-properties.html
new file mode 100644
index 0000000000000000000000000000000000000000..6963ca07fbdc597f980731b762117727e751cd1d
--- /dev/null
+++ b/polymer_0.5.0/bower_components/web-animations-js/test/blink/keyframe-properties.html
@@ -0,0 +1,53 @@
+<!doctype html>
+<title>Web Animations API: Keyframe Property tests</title>
+<script src="testharness/testharness.js"></script>
+<script src="testharness/testharnessreport.js"></script>
+<div id="log"></div>
+<div id="div"></div>
+<script>
+
+test(function() {
+ var keyframe = {};
+ Object.defineProperty(keyframe, 'width', {value: '200px'});
+ Object.defineProperty(keyframe, 'height', {
+ value: '100px',
+ enumerable: true});
+ assert_equals(keyframe.width, '200px', 'width of keyframe is readable');
+ assert_equals(keyframe.height, '100px', 'height of keyframe is readable');
+ try {
+ div.animate([keyframe, {height: '200px'}], 1);
+ } catch (e) {
+ assert_unreached("Mismatched properties - both or neither properties on keyframe were considered.");
+ }
+},
+'enumerable keyframe properties tests',
+{
+ help: 'http://dev.w3.org/fxtf/web-animations/#dfn-procedure-for-converting-an-ecmascript-value-to-an-idl-keyframe-object',
+ assert: 'Only enumerable properties on keyframes are considered',
+ author: 'Shane Stephens'
+});
+
+test(function() {
+ var KeyframeParent = function() { this.width = "100px"; };
+ KeyframeParent.prototype = { height: "100px" };
+ var Keyframe = function() { this.top = "100px"; };
+ Keyframe.prototype = Object.create(KeyframeParent.prototype);
+ Object.defineProperty(Keyframe.prototype, "left", {
+ value: '100px',
+ enumerable: 'true'});
+ var keyframe = new Keyframe();
+ try {
+ div.animate([keyframe, {top: '200px', left: '200px', height: '200px'}], 1);
+ } catch (e) {
+ assert_unreached("Mismatched properties - left, width or height not considered on keyframe.");
+ }
+},
+'inherited keyframe properties tests',
+{
+ help: 'http://dev.w3.org/fxtf/web-animations/#dfn-procedure-for-converting-an-ecmascript-value-to-an-idl-keyframe-object',
+ assert: 'Only properties in Object.keys on keyframes are considered',
+ author: 'Shane Stephens'
+});
+
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698