tenfourfox/dom/telephony/test/marionette/test_crash_emulator.js
Cameron Kaiser c9b2922b70 hello FPR
2017-04-19 00:56:45 -07:00

27 lines
771 B
JavaScript

/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
MARIONETTE_TIMEOUT = 60000;
MARIONETTE_HEAD_JS = 'head.js';
startTest(function() {
let outCall;
gDial("5555551111")
.then(call => outCall = call)
.then(() => gRemoteAnswer(outCall))
.then(() => {
return new Promise(function(resolve, reject) {
callStartTime = Date.now();
waitFor(resolve,function() {
callDuration = Date.now() - callStartTime;
log("Waiting while call is active, call duration (ms): " + callDuration);
return(callDuration >= 2000);
});
});
})
.then(() => gHangUp(outCall))
.catch(error => ok(false, "Promise reject: " + error))
.then(finish);
});