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

Side by Side Diff: third_party/WebKit/LayoutTests/usb/getDevices.html

Issue 1472693004: [Do not commit] Sample USB layout tests with Mojo service mocks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@usb-testing-4
Patch Set: rebase Created 4 years, 10 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/mojo-helpers.js"></script>
5 <script src="resources/device.mojom.js"></script>
6 <script src="resources/device_manager.mojom.js"></script>
7 <script src="resources/permission_provider.mojom.js"></script>
8 <script src="resources/fake-devices.js"></script>
9 <script src="resources/usb-helpers.js"></script>
10 <script>
11 'use strict';
12
13 usb_test(usb => {
14 usb.mockDeviceManager.addMockDevice(FAKE_PRINTER);
15
16 return navigator.usb.getDevices().then(devices => {
17 assert_equals(devices.length, 1);
18 assert_device_info_equals(devices[0], FAKE_PRINTER);
19 });
20 }, 'getDevices returns devices exposed by the DeviceManager service.');
21 </script>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/usb/getDevice.html ('k') | third_party/WebKit/LayoutTests/usb/mock-services.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698