Upstream version 5.34.98.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / regions / script-tests / content-webkit-from-flow-parsing.js
1 description('Tests parsing of -webkit-flow-from property');
2  
3 function testCSSText(declaration) {
4  var div = document.createElement("div");
5  div.setAttribute("style", declaration);
6  return div.style.webkitFlowFrom;
7 }
8
9 function testComputedStyle(declaration) {
10  var div = document.createElement("div");
11  document.body.appendChild(div);
12  div.style.setProperty("-webkit-flow-from", declaration);
13
14  var contentComputedValue = getComputedStyle(div).getPropertyValue("-webkit-flow-from");
15  document.body.removeChild(div);
16  return contentComputedValue;
17 }
18
19 shouldBeEqualToString('testCSSText("-webkit-flow-from: first-flow")', "first-flow");
20 shouldBeEqualToString('testCSSText("-webkit-flow-from: none")', "none");
21 shouldBeEqualToString('testCSSText("-webkit-flow-from: ")', "");
22 shouldBeEqualToString('testCSSText("-webkit-flow-from: \'first-flow\'")', "");
23 shouldBeEqualToString('testCSSText("-webkit-flow-from: 1")', "");
24 shouldBeEqualToString('testCSSText("-webkit-flow-from: 1.2")', "");
25 shouldBeEqualToString('testCSSText("-webkit-flow-from: -1")', "");
26 shouldBeEqualToString('testCSSText("-webkit-flow-from: 12px")', "");
27 shouldBeEqualToString('testCSSText("-webkit-from-flow: first flow")', "");
28
29 shouldBeEqualToString('testComputedStyle("first-flow")', "first-flow");
30 shouldBeEqualToString('testComputedStyle("\'first flow\'")', "none");
31 shouldBeEqualToString('testComputedStyle("none")', "none");
32 shouldBeEqualToString('testComputedStyle("initial")', "none");
33 shouldBeEqualToString('testComputedStyle("inherit")', "none");
34 shouldBeEqualToString('testComputedStyle("1")', "none");
35 shouldBeEqualToString('testComputedStyle("1.2")', "none");
36 shouldBeEqualToString('testComputedStyle("-1")', "none");
37 shouldBeEqualToString('testComputedStyle("12px")', "none");