| Index: third_party/WebKit/LayoutTests/bluetooth/disconnect-frame-detached/detach-gc.html
|
| diff --git a/third_party/WebKit/LayoutTests/bluetooth/disconnect-frame-detached/detach-gc.html b/third_party/WebKit/LayoutTests/bluetooth/disconnect-frame-detached/detach-gc.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..28f2cdb8a480521babff2f2c355296d8ceeab774
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/bluetooth/disconnect-frame-detached/detach-gc.html
|
| @@ -0,0 +1,30 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script src="../resources/bluetooth-helpers.js"></script>
|
| +<body>
|
| + <script>
|
| + "use strict";
|
| + async_test(test => {
|
| + window.onmessage = messageEvent => test.step(() => {
|
| + if (messageEvent.data === 'Ready') {
|
| + let iframe = document.querySelector('iframe');
|
| + callWithKeyDown(() => {
|
| + iframe.contentWindow.postMessage('Go', '*');
|
| + });
|
| + } else if (messageEvent.data === 'Connected') {
|
| + // Detach
|
| + iframe.remove();
|
| + // GC
|
| + runGarbageCollection().then(() => test.done());
|
| + } else {
|
| + assert_unreached('iframe sent invalid data: ' + messageEvent.data);
|
| + }
|
| + });
|
| + testRunner.setBluetoothMockDataSet('HeartRateAdapter');
|
| + let iframe = document.createElement('iframe');
|
| + iframe.src = '../resources/connectGATT-iframe.html';
|
| + document.body.appendChild(iframe);
|
| + }, 'Detach frame then garbage collect. We shouldn\'t crash.');
|
| + </script>
|
| +</body>
|
|
|