mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1112471 - Part 4: Test case for getting icc service state API. r=hsinyi
This commit is contained in:
parent
de3191fd12
commit
16c63a5c4e
@ -31,3 +31,4 @@ qemu = true
|
||||
[test_icc_access_invalid_object.js]
|
||||
[test_icc_detected_undetected_event.js]
|
||||
[test_icc_match_mvno.js]
|
||||
[test_icc_service_state.js]
|
||||
|
28
dom/icc/tests/marionette/test_icc_service_state.js
Normal file
28
dom/icc/tests/marionette/test_icc_service_state.js
Normal file
@ -0,0 +1,28 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
MARIONETTE_TIMEOUT = 60000;
|
||||
MARIONETTE_HEAD_JS = "head.js";
|
||||
|
||||
function testUnsupportedService() {
|
||||
try {
|
||||
icc.getServiceState("unsupported-service");
|
||||
ok(false, "should get exception");
|
||||
} catch (aException) {
|
||||
ok(true, "got exception: " + aException);
|
||||
}
|
||||
}
|
||||
|
||||
// Start tests
|
||||
startTestCommon(function() {
|
||||
let icc = getMozIcc();
|
||||
|
||||
// Check fdn service state
|
||||
return icc.getServiceState("fdn")
|
||||
.then((aResult) => {
|
||||
is(aResult, true, "check fdn service state");
|
||||
})
|
||||
|
||||
// Test unsupported service
|
||||
.then(() => testUnsupportedService());
|
||||
});
|
Loading…
Reference in New Issue
Block a user