Created
March 4, 2014 10:56
-
-
Save daleharvey/9344294 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client.executeScript(function(path) { | |
var script = document.createElement("script"); | |
var callback = function() { | |
console.log('>>> APPARENTLY LOADED? \n'); | |
}; | |
script.type = "text/javascript"; | |
script.src = path; | |
script.addEventListener('load', callback); | |
console.log('>>> LOADING: ' + path + '\n'); | |
document.head.appendChild(script); | |
}, ['system/unit/mock_simslot.js']); | |
client.helper.wait(5000); | |
client.executeScript(function() { | |
// var MockSIMSlot = function(conn, index) { | |
// this.conn = conn; | |
// this.index = index; | |
// this.simCard = { | |
// cardState: null | |
// }; | |
// this.update = function() {}; | |
// this.isAbsent = function() {}; | |
// this.isLocked = function() { return false; }; | |
// // Inject method | |
// ['sendStkResponse', 'sendStkMenuSelection', | |
// 'sendStkTimerExpiration', 'sendStkEventDownload'].forEach(function(name) { | |
// this[name] = function() {}; | |
// }, this); | |
// // Inject dom request | |
// ['getCardLock', 'unlockCardLock', 'setCardLock', | |
// 'getCardLockRetryCount', 'readContacts', | |
// 'updateContact', 'iccOpenChannel', 'iccExchangeAPDU', | |
// 'iccCloseChannel'].forEach(function(name) { | |
// this[name] = function() { | |
// return {}; | |
// }; | |
// }, this); | |
// }; | |
var slot = new MockSIMSlot(null, 0); | |
slot.simCard.cardState = 'pinRequired'; | |
window.wrappedJSObject.SimPinDialog.show(slot); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment