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

Side by Side Diff: third_party/WebKit/LayoutTests/bluetooth/iframeRequestDevice.html

Issue 1910933002: bluetooth: Separate requestDevice tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-mojo-gatt-connect
Patch Set: Replace uses of assert_promise_rejects because it was removed. Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4 <script src="../resources/bluetooth/bluetooth-helpers.js"></script>
5 <body>
6 <script>
7 "use strict";
8
9 const numIframes = 5;
10
11 async_test(test => {
12 let readiesReceived = 0;
13 window.onmessage = messageEvent => test.step(() => {
14 if (messageEvent.data === 'Ready') {
15 readiesReceived++;
16 }
17 if (readiesReceived < numIframes) {
18 return;
19 }
20
21 let iframesFinished = 0;
22 window.onmessage = messageEvent => test.step(() => {
23 if (messageEvent.data !== 'Success') {
24 console.error(messageEvent.data);
25 }
26 iframesFinished++;
27 if (iframesFinished === numIframes) {
28 test.done();
29 }
30 });
31
32 Array.prototype.forEach.call(document.querySelectorAll('iframe'), iframe = > {
33 callWithKeyDown(() => {
34 iframe.contentWindow.postMessage('Go', '*');
35 });
36 });
37 });
38
39 return setBluetoothFakeAdapter('HeartRateAdapter')
40 .then(() => {
41 for (let i = 0; i < numIframes; i++) {
42 let iframe = document.createElement('iframe');
43 iframe.src = '../resources/bluetooth/requestDevice-in-iframe.html';
44 document.body.appendChild(iframe);
45 }
46 });
47 }, 'Concurrent requestDevice calls in iframes work.');
48 </script>
49 </body>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | third_party/WebKit/LayoutTests/bluetooth/requestDevice.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698