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

Unified Diff: third_party/WebKit/LayoutTests/mojo/binding.html

Issue 2744963002: Introduce InterfaceEndpointClient(IEC), InterfaceEndpointHandle and (Closed)
Patch Set: Throw the error with the string being the stack trace needed to debug layouts which don't output an… Created 3 years, 9 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: third_party/WebKit/LayoutTests/mojo/binding.html
diff --git a/third_party/WebKit/LayoutTests/mojo/binding.html b/third_party/WebKit/LayoutTests/mojo/binding.html
index f04de81efb751d602118da27daf51cac19a48805..e65fda0fcce6734d91eb9e5a7fbc2f2826bfbf9a 100644
--- a/third_party/WebKit/LayoutTests/mojo/binding.html
+++ b/third_party/WebKit/LayoutTests/mojo/binding.html
@@ -82,6 +82,22 @@ binding_test(async (bindings, math) => {
var calcBinding = new bindings.Binding(math.Calculator,
new CalculatorImpl(),
bindings.makeRequest(calc));
+
+ await new Promise((resolve, reject) => {
+ calcBinding.setConnectionErrorHandler(({custom_reason, description}) => {
+ assert_equals(custom_reason, 32);
+ assert_equals(description, 'goodbye');
+ resolve();
+ });
+ calc.ptr.resetWithReason({custom_reason: 32, description: 'goodbye'});
+ });
+}, 'connection error with reason');
+
+binding_test(async (bindings, math) => {
+ var calc = new math.CalculatorPtr();
+ var calcBinding = new bindings.Binding(math.Calculator,
+ new CalculatorImpl(),
+ bindings.makeRequest(calc));
assert_equals((await calc.add(2)).value, 2);
var interfaceRequest = calcBinding.unbind();

Powered by Google App Engine
This is Rietveld 408576698