| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script> | 3 <script> |
| 4 function print(message, color) | 4 function print(message, color) |
| 5 { | 5 { |
| 6 var paragraph = document.createElement("div"); | 6 var paragraph = document.createElement("div"); |
| 7 paragraph.appendChild(document.createTextNode(message)); | 7 paragraph.appendChild(document.createTextNode(message)); |
| 8 paragraph.style.fontFamily = "monospace"; | 8 paragraph.style.fontFamily = "monospace"; |
| 9 if (color) | 9 if (color) |
| 10 paragraph.style.color = color; | 10 paragraph.style.color = color; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 } | 27 } |
| 28 | 28 |
| 29 function test() | 29 function test() |
| 30 { | 30 { |
| 31 if (window.testRunner) | 31 if (window.testRunner) |
| 32 testRunner.dumpAsText(); | 32 testRunner.dumpAsText(); |
| 33 | 33 |
| 34 shouldBe("Object.prototype.isPrototypeOf(window.DOMException)", true); | 34 shouldBe("Object.prototype.isPrototypeOf(window.DOMException)", true); |
| 35 shouldBe("Object.prototype.isPrototypeOf(window.Option)", true); | 35 shouldBe("Object.prototype.isPrototypeOf(window.Option)", true); |
| 36 | 36 |
| 37 div = document.createElement('div'); | |
| 38 div.style.color = "rgb(0, 0, 0)"; | |
| 39 cssValue = div.style.getPropertyCSSValue('color'); // actually a CSSPrimitiv
eValue | |
| 40 shouldBe("Object.prototype.isPrototypeOf(cssValue)", true); | |
| 41 | |
| 42 rgbColor = div.style.getPropertyCSSValue('color').getRGBColorValue(); | |
| 43 shouldBe("Object.prototype.isPrototypeOf(rgbColor)", true); | |
| 44 | |
| 45 div.style.clip = "rect(0, 0, 0, 0)"; | |
| 46 rect = div.style.getPropertyCSSValue('clip').getRectValue(); | |
| 47 shouldBe("Object.prototype.isPrototypeOf(rect)", true); | |
| 48 | |
| 49 styleElement = document.createElement('style'); | 37 styleElement = document.createElement('style'); |
| 50 styleElement.appendChild(document.createTextNode("* {}")); | 38 styleElement.appendChild(document.createTextNode("* {}")); |
| 51 headElement = document.getElementsByTagName('head')[0]; | 39 headElement = document.getElementsByTagName('head')[0]; |
| 52 headElement.appendChild(styleElement); | 40 headElement.appendChild(styleElement); |
| 53 styleSheetList = document.styleSheets; | 41 styleSheetList = document.styleSheets; |
| 54 shouldBe("Object.prototype.isPrototypeOf(styleSheetList)", true); | 42 shouldBe("Object.prototype.isPrototypeOf(styleSheetList)", true); |
| 55 | 43 |
| 56 styleSheet = styleSheetList[0]; | 44 styleSheet = styleSheetList[0]; |
| 57 shouldBe("Object.prototype.isPrototypeOf(styleSheet)", true); | 45 shouldBe("Object.prototype.isPrototypeOf(styleSheet)", true); |
| 58 | 46 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 74 | 62 |
| 75 <body onload="test();"> | 63 <body onload="test();"> |
| 76 <p>This test checks some DOM object prototypes that WebKit has gotten wrong in t
he past. | 64 <p>This test checks some DOM object prototypes that WebKit has gotten wrong in t
he past. |
| 77 If the test passes, you'll see a series of 'PASS' messages below.</p> | 65 If the test passes, you'll see a series of 'PASS' messages below.</p> |
| 78 <hr> | 66 <hr> |
| 79 | 67 |
| 80 <div id='console'></div> | 68 <div id='console'></div> |
| 81 | 69 |
| 82 </body> | 70 </body> |
| 83 </html> | 71 </html> |
| OLD | NEW |