| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../../resources/js-test-pre.js"></script> |
| </head> |
| <body> |
| <script> |
| description("This tests checks that all of the input values for stroke-linejoin parse correctly."); |
| |
| function test(value) |
| { |
| var div = document.createElement("div"); |
| div.setAttribute("style", value); |
| document.body.appendChild(div); |
| |
| var result = div.style.getPropertyValue("stroke-linejoin"); |
| |
| document.body.removeChild(div); |
| return result; |
| } |
| |
| function testComputedStyle(value) |
| { |
| var div = document.createElement("div"); |
| div.setAttribute("style", value); |
| document.body.appendChild(div); |
| |
| var result = window.getComputedStyle(div).strokeLinejoin; |
| document.body.removeChild(div); |
| return result; |
| } |
| |
| function testComputedStyleInherited(value) |
| { |
| var div = document.createElement("div"); |
| div.setAttribute("style", value); |
| |
| var div2 = document.createElement("div"); |
| div.appendChild(div2); |
| |
| document.body.appendChild(div); |
| |
| var result = window.getComputedStyle(div2).strokeLinejoin; |
| document.body.removeChild(div); |
| return result; |
| } |
| |
| shouldBe('testComputedStyleInherited("stroke-linejoin: miter;")', '"miter"'); |
| shouldBe('testComputedStyleInherited("stroke-linejoin: round;")', '"round"'); |
| shouldBe('testComputedStyleInherited("stroke-linejoin: bevel;")', '"bevel"'); |
| |
| shouldBe('testComputedStyle(";")', '"miter"'); |
| shouldBe('test("stroke-linejoin: miter;")', '"miter"'); |
| shouldBe('test("stroke-linejoin: round;")', '"round"'); |
| shouldBe('test("stroke-linejoin: bevel;")', '"bevel"'); |
| |
| shouldBeEqualToString('test("stroke-linejoin: mitr;")', ''); |
| shouldBeEqualToString('test("stroke-linejoin: bevl;")', ''); |
| shouldBeEqualToString('test("stroke-linejoin: 10px;")', ''); |
| shouldBeEqualToString('test("stroke-linejoin: 10%;")', ''); |
| </script> |
| <script src="../../resources/js-test-post.js"></script> |
| </body> |
| </html> |