| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../resources/js-test.js"></script> | 2 <script src="../../resources/js-test.js"></script> |
| 3 <script> | 3 <script> |
| 4 description("Exercise WebIDL type conversions."); | 4 description("Exercise WebIDL type conversions."); |
| 5 | 5 |
| 6 quiet = true; | 6 quiet = true; |
| 7 evalAndLog("converter = window.internals.typeConversions()"); | 7 evalAndLog("converter = window.internals.typeConversions()"); |
| 8 debug(""); | 8 debug(""); |
| 9 | 9 |
| 10 function verifyAttribute(attribute) | 10 function verifyAttribute(attribute) |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 evalAndLog("converter.testByteString = '!@#123ABCabc\\x00\\x80\\xFF\\r\\n\\t'"); | 584 evalAndLog("converter.testByteString = '!@#123ABCabc\\x00\\x80\\xFF\\r\\n\\t'"); |
| 585 shouldBeEqualToString("converter.testByteString", "!@#123ABCabc\x00\x80\xFF\r\n\
t"); | 585 shouldBeEqualToString("converter.testByteString", "!@#123ABCabc\x00\x80\xFF\r\n\
t"); |
| 586 shouldThrow("converter.testByteString = '\\u0100'"); | 586 shouldThrow("converter.testByteString = '\\u0100'"); |
| 587 shouldThrow("converter.testByteString = {toString: function() { throw Error(); }
}"); | 587 shouldThrow("converter.testByteString = {toString: function() { throw Error(); }
}"); |
| 588 shouldBeEqualToString("converter.testByteString", "!@#123ABCabc\x00\x80\xFF\r\n\
t"); | 588 shouldBeEqualToString("converter.testByteString", "!@#123ABCabc\x00\x80\xFF\r\n\
t"); |
| 589 ["true", "123", "null", "undefined"].forEach(function(value) { | 589 ["true", "123", "null", "undefined"].forEach(function(value) { |
| 590 evalAndLog("converter.testByteString = " + value); | 590 evalAndLog("converter.testByteString = " + value); |
| 591 shouldBeEqualToString("converter.testByteString", value); | 591 shouldBeEqualToString("converter.testByteString", value); |
| 592 }); | 592 }); |
| 593 | 593 |
| 594 evalAndLog("converter.testScalarValueString = '!@#123ABCabc\\x00\\x80\\xFF\\r\\n
\\t'"); |
| 595 shouldBeEqualToString("converter.testScalarValueString", "!@#123ABCabc\x00\x80\x
FF\r\n\t"); |
| 596 evalAndLog("converter.testScalarValueString = '\\u0100'"); |
| 597 shouldBeEqualToString("converter.testScalarValueString", "\u0100"); |
| 598 shouldThrow("converter.testScalarValueString = {toString: function() { throw Err
or(); }}"); |
| 599 shouldBeEqualToString("converter.testScalarValueString", "\u0100"); |
| 600 [{input: "\uD800", expected: "\uFFFD"}, |
| 601 {input: "\uDC00", expected: "\uFFFD"}, |
| 602 {input: "\uD800\u0000", expected: "\uFFFD\u0000"}, |
| 603 {input: "\uDC00\u0000", expected: "\uFFFD\u0000"}, |
| 604 {input: "\uDC00\uD800", expected: "\uFFFD\uFFFD"}, |
| 605 {input: "\uD834\uDD1E", expected: "\uD834\uDD1E"}, |
| 606 ].forEach(function(test) { |
| 607 evalAndLog("converter.testScalarValueString = " + JSON.stringify(test.input)
); |
| 608 shouldBeEqualToString("converter.testScalarValueString", test.expected); |
| 609 }); |
| 610 ["true", "123", "null", "undefined"].forEach(function(value) { |
| 611 evalAndLog("converter.testScalarValueString = " + value); |
| 612 shouldBeEqualToString("converter.testScalarValueString", value); |
| 613 }); |
| 614 |
| 594 </script> | 615 </script> |
| OLD | NEW |