| OLD | NEW |
| 1 This is a test case for String.prototype.anchor(name). | 1 This is a test case for String.prototype.anchor(name). |
| 2 | 2 |
| 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
| 4 | 4 |
| 5 | 5 |
| 6 PASS '_'.anchor('b') is "<a name=\"b\">_</a>" | 6 PASS '_'.anchor('b') is "<a name=\"b\">_</a>" |
| 7 PASS '<'.anchor('b') is "<a name=\"b\"><</a>" | 7 PASS '<'.anchor('b') is "<a name=\"b\"><</a>" |
| 8 PASS '_'.anchor(0x2A) is "<a name=\"42\">_</a>" | 8 PASS '_'.anchor(0x2A) is "<a name=\"42\">_</a>" |
| 9 PASS '_'.anchor('"') is "<a name=\""\">_</a>" | 9 PASS '_'.anchor('"') is "<a name=\""\">_</a>" |
| 10 PASS '_'.anchor('" href="http://www.evil.com') is "<a name=\"" href="h
ttp://www.evil.com\">_</a>" | 10 PASS '_'.anchor('" href="http://www.evil.com') is "<a name=\"" href="h
ttp://www.evil.com\">_</a>" |
| 11 PASS String.prototype.anchor.call(0x2A, 0x2A) is "<a name=\"42\">42</a>" | 11 PASS String.prototype.anchor.call(0x2A, 0x2A) is "<a name=\"42\">42</a>" |
| 12 PASS String.prototype.anchor.call(undefined) threw exception TypeError: Type err
or. | 12 FAIL String.prototype.anchor.call(undefined) should throw TypeError: Type error.
Was <a name="undefined">undefined</a>. |
| 13 PASS String.prototype.anchor.call(null) threw exception TypeError: Type error. | 13 FAIL String.prototype.anchor.call(null) should throw TypeError: Type error. Was
<a name="undefined">null</a>. |
| 14 PASS String.prototype.anchor.length is 1 | 14 PASS String.prototype.anchor.length is 1 |
| 15 PASS successfullyParsed is true | 15 PASS successfullyParsed is true |
| 16 | 16 |
| 17 TEST COMPLETE | 17 TEST COMPLETE |
| 18 | 18 |
| OLD | NEW |