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

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

Issue 309553002: Add ByteString support to IDL bindings (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add [Default=NullString] support 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/js/webidl-type-mapping.html
diff --git a/LayoutTests/fast/js/webidl-type-mapping.html b/LayoutTests/fast/js/webidl-type-mapping.html
index 613c1c132853fd52e4b20eac39c867d53b38a725..bfb9cdd13d835e4d46c0984a146a84cee9d545af 100644
--- a/LayoutTests/fast/js/webidl-type-mapping.html
+++ b/LayoutTests/fast/js/webidl-type-mapping.html
@@ -581,4 +581,21 @@ testNonNumericToNumericEnforceRange(type);
convertThrows(type, "{valueOf:function(){throw new Error('custom');}}");
debug("");
+evalAndLog("converter.testByteString = '!@#123ABCabc\\x00\\x80\\xFF\\r\\n\\t'");
+shouldBeEqualToString("converter.testByteString", "!@#123ABCabc\x00\x80\xFF\r\n\t");
+shouldThrow("converter.testByteString = '\\u0100'");
+shouldThrow("converter.testByteString = {toString: function() { throw Error(); }}");
+shouldBeEqualToString("converter.testByteString", "!@#123ABCabc\x00\x80\xFF\r\n\t");
+["true", "123", "null", "undefined"].forEach(function(value) {
+ evalAndLog("converter.testByteString = " + value);
+ shouldBeEqualToString("converter.testByteString", value);
+});
+shouldNotThrow("converter.setTestByteString('abc')");
+shouldNotThrow("converter.setTestByteStringDefaultNull('abc')");
+shouldThrow("converter.setTestByteString('\\u0100')");
+shouldThrow("converter.setTestByteStringDefaultNull('\\u0100')");
+shouldThrow("converter.setTestByteString()");
+shouldNotThrow("converter.setTestByteStringDefaultNull()");
+shouldBeEqualToString("converter.testByteString", "");
+
</script>
« no previous file with comments | « no previous file | LayoutTests/fast/js/webidl-type-mapping-expected.txt » ('j') | Source/bindings/v8/V8Binding.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698