| Index: third_party/WebKit/LayoutTests/presentation/presentation-controller-terminate-connection.html
|
| diff --git a/third_party/WebKit/LayoutTests/presentation/presentation-controller-terminate-connection.html b/third_party/WebKit/LayoutTests/presentation/presentation-controller-terminate-connection.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c6f339fc8413042f0ea8d7c6a6d09f43ad227946
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/presentation/presentation-controller-terminate-connection.html
|
| @@ -0,0 +1,29 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<body>
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +<script src="../resources/mojo-helpers.js"></script>
|
| +<script src="resources/presentation-service-mock.js"></script>
|
| +<button>click me</button>
|
| +<script>
|
| +
|
| +async_test(t => {
|
| + presentationServiceMock.then(mockService => {
|
| + var button = document.querySelector('button');
|
| + // This is receiving the user gesture and runs the callback.
|
| + waitForClick(() => {
|
| + new PresentationRequest('https://example.com').start().then(
|
| + connection => {
|
| + connection.onterminate = t.step_func_done();
|
| + connection.onconnect = () => {
|
| + connection.terminate();
|
| + };
|
| + });
|
| + }, button);
|
| + });
|
| +}, "Test that controller connection.terminate() fires onterminate event handler.");
|
| +
|
| +</script>
|
| +</body>
|
| +</html>
|
|
|