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

Side by Side Diff: third_party/WebKit/LayoutTests/bluetooth/requestDevice/request-from-iframe.html

Issue 1910933002: bluetooth: Separate requestDevice tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-mojo-gatt-connect
Patch Set: Merge 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script> 2 <script src="../../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../../resources/testharnessreport.js"></script>
4 <script src="../resources/bluetooth/bluetooth-helpers.js"></script> 4 <script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
5 <body> 5 <body>
6 <script> 6 <script>
7 "use strict"; 7 "use strict";
8 8
9 const numIframes = 5; 9 const numIframes = 5;
10 10
11 async_test(test => { 11 async_test(test => {
12 let readiesReceived = 0; 12 let readiesReceived = 0;
13 window.onmessage = messageEvent => test.step(() => { 13 window.onmessage = messageEvent => test.step(() => {
14 if (messageEvent.data === 'Ready') { 14 if (messageEvent.data === 'Ready') {
(...skipping 18 matching lines...) Expand all
33 callWithKeyDown(() => { 33 callWithKeyDown(() => {
34 iframe.contentWindow.postMessage('Go', '*'); 34 iframe.contentWindow.postMessage('Go', '*');
35 }); 35 });
36 }); 36 });
37 }); 37 });
38 38
39 return setBluetoothFakeAdapter('HeartRateAdapter') 39 return setBluetoothFakeAdapter('HeartRateAdapter')
40 .then(() => { 40 .then(() => {
41 for (let i = 0; i < numIframes; i++) { 41 for (let i = 0; i < numIframes; i++) {
42 let iframe = document.createElement('iframe'); 42 let iframe = document.createElement('iframe');
43 iframe.src = '../resources/bluetooth/requestDevice-in-iframe.html'; 43 iframe.src = '../../resources/bluetooth/requestDevice-in-iframe.html';
44 document.body.appendChild(iframe); 44 document.body.appendChild(iframe);
45 } 45 }
46 }); 46 });
47 }, 'Concurrent requestDevice calls in iframes work.'); 47 }, 'Concurrent requestDevice calls in iframes work.');
48 </script> 48 </script>
49 </body> 49 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698