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

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

Issue 2843183002: Add ResetWithReason for AssociatedInterfaceRequest. (Closed)
Patch Set: Rebase against master. Reupload patch. Created 3 years, 8 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 | « mojo/public/js/interface_types.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/mojo/associated_interface_ptr.html
diff --git a/third_party/WebKit/LayoutTests/mojo/associated_interface_ptr.html b/third_party/WebKit/LayoutTests/mojo/associated_interface_ptr.html
index ecccfec366d8aab6812d4bc68a2fdfe9eccd7eed..aaf8269117eaf848ce7e5343af977576e3550857 100644
--- a/third_party/WebKit/LayoutTests/mojo/associated_interface_ptr.html
+++ b/third_party/WebKit/LayoutTests/mojo/associated_interface_ptr.html
@@ -229,6 +229,31 @@ define([
});
}, 'connection error with reason');
+ // Test that AssociatedInterfacePtr is notified with connection error when
+ // the interface hasn't associated with a message pipe and the peer is
+ // closed.
+ promise_test(async () => {
+ var integerSenderPtrInfo = new
+ associatedBindings.AssociatedInterfacePtrInfo();
+ var integerSenderRequest = associatedBindings.makeRequest(
+ integerSenderPtrInfo);
+
+ var integerSender = new
+ testAssociatedInterfaces.AssociatedIntegerSenderPtr(
+ integerSenderPtrInfo);
+
+ await new Promise((resolve, reject) => {
+ integerSender.ptr.setConnectionErrorHandler(function({custom_reason,
+ description}) {
+ assert_equals(custom_reason, 42);
+ assert_equals(description, 'hey');
+ resolve();
+ });
+ integerSenderRequest.resetWithReason({custom_reason: 42,
+ description: 'hey'})
+ });
+ }, 'pending AssociatedInterfacePtr connection error with reason');
+
promise_test(async () => {
var integerSenderConnection = new
testAssociatedInterfaces.IntegerSenderConnectionPtr();
« no previous file with comments | « mojo/public/js/interface_types.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698