Copied: branches/safari-536.26-branch/LayoutTests/animations/animation-shorthand-name-order-expected.txt (from rev 122277, trunk/LayoutTests/animations/animation-shorthand-name-order-expected.txt) (0 => 124138)
--- branches/safari-536.26-branch/LayoutTests/animations/animation-shorthand-name-order-expected.txt (rev 0)
+++ branches/safari-536.26-branch/LayoutTests/animations/animation-shorthand-name-order-expected.txt 2012-07-31 01:34:12 UTC (rev 124138)
@@ -0,0 +1,71 @@
+PASS Test 1: webkitAnimationName was test
+PASS Test 1: webkitAnimationDuration was 3s
+PASS Test 1: webkitAnimationTimingFunction was cubic-bezier(0.25, 0.1, 0.25, 1)
+PASS Test 1: webkitAnimationDelay was 0s
+PASS Test 1: webkitAnimationIterationCount was 1
+PASS Test 1: webkitAnimationDirection was normal
+PASS Test 1: webkitAnimationFillMode was none
+PASS Test 2: webkitAnimationName was test
+PASS Test 2: webkitAnimationDuration was 3s
+PASS Test 2: webkitAnimationTimingFunction was cubic-bezier(0.25, 0.1, 0.25, 1)
+PASS Test 2: webkitAnimationDelay was 0s
+PASS Test 2: webkitAnimationIterationCount was 1
+PASS Test 2: webkitAnimationDirection was normal
+PASS Test 2: webkitAnimationFillMode was none
+PASS Test 3: webkitAnimationName was test
+PASS Test 3: webkitAnimationDuration was 3s
+PASS Test 3: webkitAnimationTimingFunction was cubic-bezier(0.25, 0.1, 0.25, 1)
+PASS Test 3: webkitAnimationDelay was 0s
+PASS Test 3: webkitAnimationIterationCount was 1
+PASS Test 3: webkitAnimationDirection was normal
+PASS Test 3: webkitAnimationFillMode was forwards
+PASS Test 4: webkitAnimationName was test
+PASS Test 4: webkitAnimationDuration was 3s
+PASS Test 4: webkitAnimationTimingFunction was cubic-bezier(0.25, 0.1, 0.25, 1)
+PASS Test 4: webkitAnimationDelay was 0s
+PASS Test 4: webkitAnimationIterationCount was 1
+PASS Test 4: webkitAnimationDirection was normal
+PASS Test 4: webkitAnimationFillMode was forwards
+PASS Test 5: webkitAnimationName was test
+PASS Test 5: webkitAnimationDuration was 3s
+PASS Test 5: webkitAnimationTimingFunction was linear
+PASS Test 5: webkitAnimationDelay was 0s
+PASS Test 5: webkitAnimationIterationCount was 1
+PASS Test 5: webkitAnimationDirection was normal
+PASS Test 5: webkitAnimationFillMode was forwards
+PASS Test 6: webkitAnimationName was test
+PASS Test 6: webkitAnimationDuration was 3s
+PASS Test 6: webkitAnimationTimingFunction was linear
+PASS Test 6: webkitAnimationDelay was 0s
+PASS Test 6: webkitAnimationIterationCount was 1
+PASS Test 6: webkitAnimationDirection was normal
+PASS Test 6: webkitAnimationFillMode was forwards
+PASS Test 7: webkitAnimationName was test
+PASS Test 7: webkitAnimationDuration was 3s
+PASS Test 7: webkitAnimationTimingFunction was linear
+PASS Test 7: webkitAnimationDelay was 4s
+PASS Test 7: webkitAnimationIterationCount was 5
+PASS Test 7: webkitAnimationDirection was normal
+PASS Test 7: webkitAnimationFillMode was forwards
+PASS Test 8: webkitAnimationName was test
+PASS Test 8: webkitAnimationDuration was 3s
+PASS Test 8: webkitAnimationTimingFunction was linear
+PASS Test 8: webkitAnimationDelay was 4s
+PASS Test 8: webkitAnimationIterationCount was infinite
+PASS Test 8: webkitAnimationDirection was alternate
+PASS Test 8: webkitAnimationFillMode was forwards
+PASS Test 9: webkitAnimationName was test
+PASS Test 9: webkitAnimationDuration was 3s
+PASS Test 9: webkitAnimationTimingFunction was linear
+PASS Test 9: webkitAnimationDelay was 4s
+PASS Test 9: webkitAnimationIterationCount was infinite
+PASS Test 9: webkitAnimationDirection was alternate
+PASS Test 9: webkitAnimationFillMode was none
+PASS Test 10: webkitAnimationName was linear
+PASS Test 10: webkitAnimationDuration was 3s
+PASS Test 10: webkitAnimationTimingFunction was cubic-bezier(0.25, 0.1, 0.25, 1)
+PASS Test 10: webkitAnimationDelay was 4s
+PASS Test 10: webkitAnimationIterationCount was infinite
+PASS Test 10: webkitAnimationDirection was alternate
+PASS Test 10: webkitAnimationFillMode was forwards
+
Copied: branches/safari-536.26-branch/LayoutTests/animations/animation-shorthand-name-order.html (from rev 122277, trunk/LayoutTests/animations/animation-shorthand-name-order.html) (0 => 124138)
--- branches/safari-536.26-branch/LayoutTests/animations/animation-shorthand-name-order.html (rev 0)
+++ branches/safari-536.26-branch/LayoutTests/animations/animation-shorthand-name-order.html 2012-07-31 01:34:12 UTC (rev 124138)
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Shorthand animation name ordering test</title>
+<style>
+#box {
+ position: relative;
+ height: 100px;
+ width: 100px;
+ background-color: red;
+ margin: 5px;
+}
+
+@-webkit-keyframes test {
+ from { left: 0px; }
+ to { left: 100px; }
+}
+
+@-webkit-keyframes backwards {
+ from { left: 0px; }
+ to { left: 100px; }
+}
+
+@-webkit-keyframes alternate {
+ from { left: 0px; }
+ to { left: 100px; }
+}
+
+@-webkit-keyframes linear {
+ from { left: 0px; }
+ to { left: 100px; }
+}
+
+@-webkit-keyframes ease {
+ from { left: 0px; }
+ to { left: 100px; }
+}
+</style>
+<script>
+
+const PROPERTIES_TO_TEST = [
+ "webkitAnimationName",
+ "webkitAnimationDuration",
+ "webkitAnimationTimingFunction",
+ "webkitAnimationDelay",
+ "webkitAnimationIterationCount",
+ "webkitAnimationDirection",
+ "webkitAnimationFillMode"
+];
+
+const DEFAULT_VALUES = [
+ "none",
+ "0",
+ "ease",
+ "0",
+ "1",
+ "normal",
+ "none"
+];
+
+const TEST_INPUTS = [
+ "test 3s",
+ "3s test", // name is not first
+ "3s test forwards", // includes fill mode
+ "3s forwards test", // fill mode will match before name
+ "3s linear forwards test", // both timing and fill mode will match first
+ "3s forwards test linear", // name in between two keywords
+ "3s 4s 5 forwards linear test", // name coming last
+ "3s 4s infinite alternate forwards linear test", // all keywords before name
+ "3s 4s infinite alternate none linear test", // none keyword for fill mode before none keyword for name
+ "3s 4s infinite alternate forwards ease linear", // a special case where the 'linear' animation name will actually work because the timing function already parsed
+];
+
+const EXPECTED_VALUES = [
+ ["test", "3s", "cubic-bezier(0.25, 0.1, 0.25, 1)", "0s", "1", "normal", "none"],
+ ["test", "3s", "cubic-bezier(0.25, 0.1, 0.25, 1)", "0s", "1", "normal", "none"],
+ ["test", "3s", "cubic-bezier(0.25, 0.1, 0.25, 1)", "0s", "1", "normal", "forwards"],
+ ["test", "3s", "cubic-bezier(0.25, 0.1, 0.25, 1)", "0s", "1", "normal", "forwards"],
+ ["test", "3s", "linear", "0s", "1", "normal", "forwards"],
+ ["test", "3s", "linear", "0s", "1", "normal", "forwards"],
+ ["test", "3s", "linear", "4s", "5", "normal", "forwards"],
+ ["test", "3s", "linear", "4s", "infinite", "alternate", "forwards"],
+ ["test", "3s", "linear", "4s", "infinite", "alternate", "none"],
+ ["linear", "3s", "cubic-bezier(0.25, 0.1, 0.25, 1)", "4s", "infinite", "alternate", "forwards"],
+];
+
+var numTestsComplete = 0;
+
+function runTests() {
+ runIndividualTest(0);
+}
+
+function clearElementAnimationStyle(element) {
+ for (var i=0; i < PROPERTIES_TO_TEST.length; i++)
+ element.style[PROPERTIES_TO_TEST[i]] = DEFAULT_VALUES[i];
+}
+
+function runIndividualTest(testIndex) {
+ var result = document.getElementById("result");
+ var element = document.getElementById("box");
+
+ clearElementAnimationStyle(element);
+
+ // Unfortunately need to force a style recalculation before testing.
+ setTimeout(function () {
+ element.style.webkitAnimation = TEST_INPUTS[testIndex];
+
+ // And another forced style recalculation.
+ setTimeout(function() {
+ var computedStyle = window.getComputedStyle(element);
+
+ for (var i=0; i < PROPERTIES_TO_TEST.length; i++) {
+ var value = computedStyle[PROPERTIES_TO_TEST[i]];
+ if (value == EXPECTED_VALUES[testIndex][i])
+ result.innerHTML += "PASS Test " + (numTestsComplete + 1) + ": " + PROPERTIES_TO_TEST[i] + " was " + value + "<br>";
+ else
+ result.innerHTML += "FAIL Test " + (numTestsComplete + 1) + ": " + PROPERTIES_TO_TEST[i] + " was " + value + " should be " + EXPECTED_VALUES[testIndex][i] + "<br>";
+ }
+
+ numTestsComplete++;
+ if (numTestsComplete < TEST_INPUTS.length)
+ runIndividualTest(numTestsComplete);
+ else {
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }
+ }, 0);
+ }, 0);
+}
+
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+window.addEventListener("load", runTests, false);
+</script>
+</head>
+<body>
+<div id="box"></div>
+<div id="result"></div>
+</body>
+</html>