Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: LayoutTests/fast/js/webidl-type-mapping.html

Issue 337373002: Add [TreatReturnedNullStringAs] support for ByteString. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add test Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/js/webidl-type-mapping-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 debug(""); 582 debug("");
583 583
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 shouldBeEqualToString("converter.testByteStringTreatReturnedNullStringAsNull Attribute", value);
593 shouldBeEqualToString("converter.testByteStringTreatReturnedNullStringAsUnde finedAttribute", value);
594 shouldBeEqualToString("converter.getTestByteStringTreatReturnedNullStringAsN ullMethod()", value);
595 shouldBeEqualToString("converter.getTestByteStringTreatReturnedNullStringAsU ndefinedMethod()", value);
592 }); 596 });
593 shouldNotThrow("converter.setTestByteString('abc')"); 597 shouldNotThrow("converter.setTestByteString('abc')");
594 shouldNotThrow("converter.setTestByteStringDefaultNull('abc')"); 598 shouldNotThrow("converter.setTestByteStringDefaultNull('abc')");
595 shouldThrow("converter.setTestByteString('\\u0100')"); 599 shouldThrow("converter.setTestByteString('\\u0100')");
596 shouldThrow("converter.setTestByteStringDefaultNull('\\u0100')"); 600 shouldThrow("converter.setTestByteStringDefaultNull('\\u0100')");
597 shouldThrow("converter.setTestByteString()"); 601 shouldThrow("converter.setTestByteString()");
598 shouldNotThrow("converter.setTestByteStringDefaultNull()"); 602 shouldNotThrow("converter.setTestByteStringDefaultNull()");
599 shouldBeEqualToString("converter.testByteString", ""); 603 shouldBeEqualToString("converter.testByteString", "");
604 shouldBeNull("converter.testByteStringTreatReturnedNullStringAsNullAttribute");
605 shouldBeUndefined("converter.testByteStringTreatReturnedNullStringAsUndefinedAtt ribute");
606 shouldBeNull("converter.getTestByteStringTreatReturnedNullStringAsNullMethod()") ;
607 shouldBeUndefined("converter.getTestByteStringTreatReturnedNullStringAsUndefined Method()");
600 608
601 </script> 609 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/js/webidl-type-mapping-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698