Revision 38ee01419de80dcbc8be2f3e08a4a5453a7b66cf authored by moz-wptsync-bot on 27 July 2018, 12:09:41 UTC, committed by jgraham on 27 July 2018, 12:09:41 UTC
Previously we set this window size when restoring all default values for a session during test teardown. Which means that the very first test after the browser has been started will run with the browser window default size. This change enforces that all tests use the default window size of 800x600. bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1478368 gecko-commit: c5c4d8725e4f2ae3ed4ab7be243415ce1905ddbe gecko-integration-branch: central gecko-reviewers: ato
1 parent cf802ca
idlharness.https.any.js
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
// META: script=/webusb/resources/fake-devices.js
// META: script=/webusb/resources/usb-helpers.js
// META: global=sharedworker
'use strict';
// Object instances used by the IDL test.
var usbDevice;
var usbConfiguration;
var usbInterface;
var usbAlternateInterface;
var usbEndpoint;
var usbConnectionEvent;
usb_test(async () => {
// Ignored errors are surfaced in idlharness.js's test_object below.
let device;
try {
device = (await getFakeDevice()).device;
} catch (e) {}
return idl_test(
['webusb'],
['html', 'dom'],
idl_array => {
// Untested IDL interfaces
idl_array.add_untested_idls('dictionary PermissionDescriptor {};');
idl_array.add_untested_idls('interface PermissionStatus {};');
try {
usbDevice = device;
usbConfiguration = usbDevice.configurations[0];
usbInterface = usbConfiguration.interfaces[0];
usbAlternateInterface = usbInterface.alternates[0];
usbEndpoint = usbAlternateInterface.endpoints[0];
usbConnectionEvent =
new USBConnectionEvent('connect', { device: usbDevice })
} catch (e) {}
if (self.GLOBAL.isWindow()) {
idl_array.add_objects({ Navigator: ['navigator'] });
} else if (self.GLOBAL.isWorker()) {
idl_array.add_objects({ WorkerNavigator: ['navigator'] });
}
idl_array.add_objects({
Navigator: ['navigator'],
USB: ['navigator.usb'],
USBAlternateInterface: ['usbAlternateInterface'],
USBConfiguration: ['usbConfiguration'],
USBConnectionEvent: ['usbConnectionEvent'],
USBDevice: ['usbDevice'],
USBEndpoint: ['usbEndpoint'],
USBInterface: ['usbInterface'],
USBInTransferResult: ['new USBInTransferResult("ok")'],
USBOutTransferResult: ['new USBOutTransferResult("ok")'],
USBIsochronousInTransferResult: ['new USBIsochronousInTransferResult([])'],
USBIsochronousOutTransferResult: ['new USBIsochronousOutTransferResult([])'],
USBIsochronousInTransferPacket: ['new USBIsochronousInTransferPacket("ok")'],
USBIsochronousOutTransferPacket: ['new USBIsochronousOutTransferPacket("ok")'],
});
idl_array.prevent_multiple_testing('Navigator');
},
'WebUSB IDL test'
)
});
done();
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...