mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 943234 - Part 2: update test cases. r=vicamo
From fb153186a90d3045d71176e025201ce4a14c2c9b Mon Sep 17 00:00:00 2001 --- dom/icc/tests/marionette/test_icc_contact.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
This commit is contained in:
parent
8c0bae43cd
commit
69184fe3c8
@ -4,6 +4,8 @@
|
||||
MARIONETTE_TIMEOUT = 60000;
|
||||
MARIONETTE_HEAD_JS = "icc_header.js";
|
||||
|
||||
const EMULATOR_ICCID = "89014103211118510720";
|
||||
|
||||
function testReadContacts(type) {
|
||||
let request = icc.readContacts(type);
|
||||
request.onsuccess = function onsuccess() {
|
||||
@ -13,19 +15,19 @@ function testReadContacts(type) {
|
||||
|
||||
is(contacts[0].name[0], "Mozilla");
|
||||
is(contacts[0].tel[0].value, "15555218201");
|
||||
is(contacts[0].id, "890141032111185107201");
|
||||
is(contacts[0].id, EMULATOR_ICCID + "1");
|
||||
|
||||
is(contacts[1].name[0], "Saßê黃");
|
||||
is(contacts[1].tel[0].value, "15555218202");
|
||||
is(contacts[1].id, "890141032111185107202");
|
||||
is(contacts[1].id, EMULATOR_ICCID + "2");
|
||||
|
||||
is(contacts[2].name[0], "Fire 火");
|
||||
is(contacts[2].tel[0].value, "15555218203");
|
||||
is(contacts[2].id, "890141032111185107203");
|
||||
is(contacts[2].id, EMULATOR_ICCID + "3");
|
||||
|
||||
is(contacts[3].name[0], "Huang 黃");
|
||||
is(contacts[3].tel[0].value, "15555218204");
|
||||
is(contacts[3].id, "890141032111185107204");
|
||||
is(contacts[3].id, EMULATOR_ICCID + "4");
|
||||
|
||||
taskHelper.runNext();
|
||||
};
|
||||
@ -46,6 +48,11 @@ function testAddContact(type, pin2) {
|
||||
let updateRequest = icc.updateContact(type, contact, pin2);
|
||||
|
||||
updateRequest.onsuccess = function onsuccess() {
|
||||
let updatedContact = updateRequest.result;
|
||||
ok(updatedContact, "updateContact should have retuend a mozContact.");
|
||||
ok(updatedContact.id.startsWith(EMULATOR_ICCID),
|
||||
"The returned mozContact has wrong id.");
|
||||
|
||||
// Get ICC contact for checking new contact
|
||||
|
||||
let getRequest = icc.readContacts(type);
|
||||
|
Loading…
Reference in New Issue
Block a user