zalan@apple.com | fe8ae58 | 2014-08-20 14:44:56 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <title>This test that double borders are painted.</title> |
| 5 | <style> |
| 6 | .borderBox { |
| 7 | position: absolute; |
| 8 | width: 30px; |
| 9 | height: 30px; |
| 10 | border-style: double; |
| 11 | border-color: red; |
| 12 | } |
| 13 | |
| 14 | .hide { |
| 15 | position: fixed; |
| 16 | width: 4px; |
| 17 | height: 4px; |
| 18 | background-color: white; |
| 19 | } |
| 20 | </style> |
| 21 | <head> |
| 22 | <body> |
| 23 | <script> |
| 24 | var borderWidth = 3; |
| 25 | var x = 0; |
| 26 | var y = 0; |
| 27 | var cornerBoxSize = 0; |
| 28 | for (var i = 0; i < 10; ++i) { |
| 29 | w = 20 * i; |
| 30 | h = 20 * i; |
| 31 | cornerBoxSize = 2 * borderWidth; |
| 32 | |
| 33 | var e = document.createElement("div"); |
| 34 | e.className = "borderBox"; |
| 35 | e.style.top = y + "px"; |
| 36 | e.style.left = x + "px"; |
| 37 | e.style.width = w + "px"; |
| 38 | e.style.height = h + "px"; |
| 39 | e.style.borderWidth = borderWidth + "px"; |
| 40 | document.body.appendChild(e); |
| 41 | |
| 42 | var hb1 = document.createElement("div"); |
| 43 | hb1.className = "hide"; |
| 44 | hb1.style.top = y + "px"; |
| 45 | hb1.style.left = x + "px"; |
| 46 | hb1.style.width = cornerBoxSize + "px"; |
| 47 | hb1.style.height = cornerBoxSize + "px"; |
| 48 | document.body.appendChild(hb1); |
| 49 | |
| 50 | var hb2 = document.createElement("div"); |
| 51 | hb2.className = "hide"; |
| 52 | hb2.style.top = y + "px"; |
| 53 | hb2.style.left = x + w + "px"; |
| 54 | hb2.style.width = cornerBoxSize + "px"; |
| 55 | hb2.style.height = cornerBoxSize + "px"; |
| 56 | document.body.appendChild(hb2); |
| 57 | |
| 58 | var hb3 = document.createElement("div"); |
| 59 | hb3.className = "hide"; |
| 60 | hb3.style.top = y + h + "px"; |
| 61 | hb3.style.left = x + "px"; |
| 62 | hb3.style.width = cornerBoxSize + "px"; |
| 63 | hb3.style.height = cornerBoxSize + "px"; |
| 64 | document.body.appendChild(hb3); |
| 65 | |
| 66 | var hb4 = document.createElement("div"); |
| 67 | hb4.className = "hide"; |
| 68 | hb4.style.top = y + w + "px"; |
| 69 | hb4.style.left = x + h + "px"; |
| 70 | hb4.style.width = cornerBoxSize + "px"; |
| 71 | hb4.style.height = cornerBoxSize + "px"; |
| 72 | document.body.appendChild(hb4); |
| 73 | |
| 74 | borderWidth += 1; |
| 75 | x += (w + 2 * borderWidth); |
| 76 | } |
| 77 | </script> |
| 78 | </body> |
| 79 | </html> |