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

Unified Diff: LayoutTests/fast/js/Promise-bindings-check-exception-expected.txt

Issue 232563003: API functions returning Promises should not throw exceptions. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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 | « LayoutTests/fast/js/Promise-bindings-check-exception.html ('k') | Source/bindings/core/v8/ExceptionState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/js/Promise-bindings-check-exception-expected.txt
diff --git a/LayoutTests/fast/js/Promise-bindings-check-exception-expected.txt b/LayoutTests/fast/js/Promise-bindings-check-exception-expected.txt
new file mode 100644
index 0000000000000000000000000000000000000000..dd3d28ddd3a0019bac9d560e7dbf16eaf6f777c8
--- /dev/null
+++ b/LayoutTests/fast/js/Promise-bindings-check-exception-expected.txt
@@ -0,0 +1,42 @@
+Operations that return a Promise type should handle exceptions by returning a rejected Promise with the exception.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+PASS Rejected as expected: no arguments
+PASS reason instanceof Error is true
+TypeError: Failed to execute 'promiseCheck' on 'Internals': 5 arguments required, but only 0 present.
+PASS Resolved as expected: valid arguments
+PASS Resolved as expected: convert(long)
+PASS Resolved as expected: convert(boolean)
+PASS Rejected as expected: type error(Dictionary)
+PASS reason instanceof Error is true
+TypeError: Failed to execute 'promiseCheck' on 'Internals': parameter 3 ('arg3') is not an object.
+PASS Resolved as expected: convert(String)
+PASS Rejected as expected: conversion error(toString)
+PASS reason instanceof Error is true
+Error: Thrown from toString
+PASS Rejected as expected: conversion error([String])
+PASS reason instanceof Error is true
+Error: Thrown from toString
+PASS Rejected as expected: rejected by the impl
+PASS reason instanceof Error is true
+InvalidStateError: Failed to execute 'promiseCheck' on 'Internals': Thrown from the native implementation.
+PASS Rejected as expected: no arguments
+PASS reason instanceof Error is true
+TypeError: Failed to execute 'promiseCheckWithoutExceptionState' on 'Internals': 2 arguments required, but only 0 present.
+PASS Resolved as expected: valid arguments
+PASS Resolved as expected: valid arguments
+PASS Rejected as expected: type error(Dictionary)
+PASS reason instanceof Error is true
+TypeError: Failed to execute 'promiseCheckWithoutExceptionState' on 'Internals': parameter 1 ('arg1') is not an object.
+PASS Resolved as expected: convert(String...)
+PASS Rejected as expected: conversion error(String...)
+PASS reason instanceof Error is true
+Error: Thrown from toString
+PASS Rejected as expected: range error(octet)
+PASS reason instanceof Error is true
+TypeError: Failed to execute 'promiseCheckRange' on 'Internals': Value is outside the 'octet' value range.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
« no previous file with comments | « LayoutTests/fast/js/Promise-bindings-check-exception.html ('k') | Source/bindings/core/v8/ExceptionState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698