| OLD | NEW |
| (Empty) |
| 1 function testParse(declaration) { | |
| 2 var div = document.createElement("div"); | |
| 3 div.setAttribute("style", declaration); | |
| 4 return div.style.webkitFlowInto; | |
| 5 } | |
| 6 | |
| 7 function testComputedStyle(value) { | |
| 8 var div = document.createElement("div"); | |
| 9 document.body.appendChild(div); | |
| 10 div.style.setProperty("-webkit-flow-into", value); | |
| 11 var webkitFlowComputedValue = getComputedStyle(div).getPropertyValue("-webki
t-flow-into"); | |
| 12 document.body.removeChild(div); | |
| 13 return webkitFlowComputedValue; | |
| 14 } | |
| 15 | |
| 16 function testNotInherited(parentValue, childValue) { | |
| 17 var parentDiv = document.createElement("div"); | |
| 18 document.body.appendChild(parentDiv); | |
| 19 parentDiv.style.setProperty("-webkit-flow-into", parentValue); | |
| 20 | |
| 21 var childDiv = document.createElement("div"); | |
| 22 parentDiv.appendChild(childDiv); | |
| 23 childDiv.style.setProperty("-webkit-flow-into", childValue); | |
| 24 | |
| 25 var childWebKitFlowComputedValue = getComputedStyle(childDiv).getPropertyVal
ue("-webkit-flow-into"); | |
| 26 | |
| 27 parentDiv.removeChild(childDiv); | |
| 28 document.body.removeChild(parentDiv); | |
| 29 | |
| 30 return childWebKitFlowComputedValue; | |
| 31 } | |
| 32 | |
| 33 test(function() {assert_equals(testParse("-webkit-flow-into: none"), "none")}, "
Test Parse none"); | |
| 34 test(function() {assert_equals(testParse("-webkit-flow-into: first-flow"), "firs
t-flow")}, "Test Parse first-flow"); | |
| 35 test(function() {assert_equals(testParse("-webkit-flow-into: \'first flow\'"), "
")}, "Test Parse 'first-flow'"); | |
| 36 test(function() {assert_equals(testParse("-webkit-flow-into: ;"), "")}, "Test Pa
rse ;"); | |
| 37 test(function() {assert_equals(testParse("-webkit-flow-into: 1"), "")}, "Test Pa
rse 1"); | |
| 38 test(function() {assert_equals(testParse("-webkit-flow-into: 1.2"), "")}, "Test
Parse 1.2"); | |
| 39 test(function() {assert_equals(testParse("-webkit-flow-into: -1"), "")}, "Test P
arse -1"); | |
| 40 test(function() {assert_equals(testParse("-webkit-flow-into: 12px"), "")}, "Test
Parse 12px"); | |
| 41 | |
| 42 test(function() {assert_equals(testComputedStyle("none"), "none")}, "Test Comput
ed Style none"); | |
| 43 test(function() {assert_equals(testComputedStyle(""), "none")}, "Test Computed S
tyle ''"); | |
| 44 test(function() {assert_equals(testComputedStyle("\'first-flow\'"), "none")}, "T
est Computed Style 'first-flow'"); | |
| 45 test(function() {assert_equals(testComputedStyle("first-flow"), "first-flow")},
"Test Computed Style first-flow"); | |
| 46 test(function() {assert_equals(testComputedStyle("12px"), "none")}, "Test Comput
ed Style 12px "); | |
| 47 | |
| 48 test(function() {assert_equals(testNotInherited("none", "none"), "none")}, "Test
Non-Inherited none, none"); | |
| 49 test(function() {assert_equals(testNotInherited("none", "child-flow"), "child-fl
ow")}, "Test Non-Inherited none, child-flow"); | |
| 50 test(function() {assert_equals(testNotInherited("parent-flow", "none"), "none")}
, "Test Non-Inherited parent-flow, none"); | |
| 51 test(function() {assert_equals(testNotInherited("parent-flow", "child-flow"), "c
hild-flow")}, "Test Non-Inherited parent-flow, child-flow"); | |
| OLD | NEW |