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

Unified Diff: LayoutTests/fast/js/dictionary-string-conversion-exception.html

Issue 23812006: Have Dictionary use V8TRYCATCH_FOR_V8STRINGRESOURCE() macro (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add test Created 7 years, 3 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
« no previous file with comments | « no previous file | LayoutTests/fast/js/dictionary-string-conversion-exception-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/js/dictionary-string-conversion-exception.html
diff --git a/LayoutTests/fast/js/dictionary-string-conversion-exception.html b/LayoutTests/fast/js/dictionary-string-conversion-exception.html
new file mode 100644
index 0000000000000000000000000000000000000000..a1780537dfa1465c95e95aafa6db23aa1b9b166f
--- /dev/null
+++ b/LayoutTests/fast/js/dictionary-string-conversion-exception.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<script src="resources/js-test-pre.js"></script>
+</head>
+<body>
+<script>
+description("Checks that an exception is thrown when a dictionary value cannot be converted to a String");
+shouldBeEqualToString("new MessageEvent('message', {origin: 'test'}).origin", "test");
+shouldBeEqualToString("new MessageEvent('message', {origin: 2}).origin", "2");
+var nonConvertibleToString = {toString: function() { throw "Exception in toString()"; }};
+shouldThrow("new MessageEvent('message', {origin: nonConvertibleToString})", "'Exception in toString()'");
+</script>
+<script src="resources/js-test-post.js"></script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/js/dictionary-string-conversion-exception-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698