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

Unified Diff: third_party/WebKit/LayoutTests/presentation/resources/presentation-receiver-close-connection.html

Issue 2874483002: [Presentation API] Remove closed connections from PresentationConnectionList (Closed)
Patch Set: rebase with master Created 3 years, 7 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/presentation/resources/presentation-receiver-close-connection.html
diff --git a/third_party/WebKit/LayoutTests/presentation/resources/presentation-receiver-close-connection.html b/third_party/WebKit/LayoutTests/presentation/resources/presentation-receiver-close-connection.html
index 1bf738a981a222cab81da4baa5a19f0b533610d1..84295feeb1af6adb3ba556467e6d27437f9719cc 100644
--- a/third_party/WebKit/LayoutTests/presentation/resources/presentation-receiver-close-connection.html
+++ b/third_party/WebKit/LayoutTests/presentation/resources/presentation-receiver-close-connection.html
@@ -27,11 +27,16 @@ presentationServiceMock.then(mockService => {
const connection = list.connections[0];
connection.onclose = () => {
assert_equals(connection.state, 'closed');
- opener.postMessage('receiver connection closed', '*');
+ setTimeout(() => {
+ assert_equals(list.connections.length, 0);
+ opener.postMessage('receiver connection closed', '*');
+ } ,0);
};
opener.postMessage('receiver connection ready', '*');
if (shouldCallClose) {
- connection.close();
+ list.connections.forEach(theConnection => {
+ theConnection.close();
+ });
}
});
});

Powered by Google App Engine
This is Rietveld 408576698