From a43cc4320c94892baf3b297ae8879d43cf369a54 Mon Sep 17 00:00:00 2001
From: B2G Bumper Bot
Date: Sat, 22 Mar 2014 05:11:06 -0700
Subject: [PATCH 1/7] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump
========
https://hg.mozilla.org/integration/gaia-central/rev/fde9b4569492
Author: Arnau
Desc: Merge pull request #17445 from rnowm/986466
Bug 986466 - [VDR] Incorrect use of edit mode [BB]
========
https://hg.mozilla.org/integration/gaia-central/rev/208b5cf7e0b2
Author: rnowm
Desc: Bug 986466 - [VDR] Incorrect use of edit mode [BB]
---
b2g/config/gaia.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json
index 4309070c388..7a3b6d84b0a 100644
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -4,6 +4,6 @@
"branch": "",
"revision": ""
},
- "revision": "4926fae1778461d93ff10b0fe4f8430246373e03",
+ "revision": "fde9b45694924b72c8f38dd485bbca1dd9cf5aa3",
"repo_path": "/integration/gaia-central"
}
From 617eb8d74b3ffca3c3f180d31aeb006eafbf7f4d Mon Sep 17 00:00:00 2001
From: B2G Bumper Bot
Date: Sat, 22 Mar 2014 05:16:12 -0700
Subject: [PATCH 2/7] Bumping manifests a=b2g-bump
---
b2g/config/emulator-ics/sources.xml | 2 +-
b2g/config/emulator-jb/sources.xml | 2 +-
b2g/config/emulator-kk/sources.xml | 2 +-
b2g/config/emulator/sources.xml | 2 +-
b2g/config/hamachi/sources.xml | 2 +-
b2g/config/helix/sources.xml | 2 +-
b2g/config/inari/sources.xml | 2 +-
b2g/config/leo/sources.xml | 2 +-
b2g/config/mako/sources.xml | 2 +-
b2g/config/wasabi/sources.xml | 2 +-
10 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml
index bf6e6b2572a..573e2ec4a77 100644
--- a/b2g/config/emulator-ics/sources.xml
+++ b/b2g/config/emulator-ics/sources.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml
index 4124da0c93d..8f29d833e95 100644
--- a/b2g/config/emulator-jb/sources.xml
+++ b/b2g/config/emulator-jb/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml
index 181154bda6b..026dc1f10c1 100644
--- a/b2g/config/emulator-kk/sources.xml
+++ b/b2g/config/emulator-kk/sources.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml
index bf6e6b2572a..573e2ec4a77 100644
--- a/b2g/config/emulator/sources.xml
+++ b/b2g/config/emulator/sources.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml
index b1e91ec9c46..e9f0a3076d5 100644
--- a/b2g/config/hamachi/sources.xml
+++ b/b2g/config/hamachi/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml
index a040c6953f6..d886d4070d9 100644
--- a/b2g/config/helix/sources.xml
+++ b/b2g/config/helix/sources.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/b2g/config/inari/sources.xml b/b2g/config/inari/sources.xml
index b95824f5b1b..b414d040e1f 100644
--- a/b2g/config/inari/sources.xml
+++ b/b2g/config/inari/sources.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/b2g/config/leo/sources.xml b/b2g/config/leo/sources.xml
index 26c6acef276..86896c0927c 100644
--- a/b2g/config/leo/sources.xml
+++ b/b2g/config/leo/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/mako/sources.xml b/b2g/config/mako/sources.xml
index 381594d8a00..23563c2c828 100644
--- a/b2g/config/mako/sources.xml
+++ b/b2g/config/mako/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml
index 0ee445a1ceb..1b32f02470e 100644
--- a/b2g/config/wasabi/sources.xml
+++ b/b2g/config/wasabi/sources.xml
@@ -17,7 +17,7 @@
-
+
From 04f0999d40b9768cda47d84724e046aabe17dbd4 Mon Sep 17 00:00:00 2001
From: B2G Bumper Bot
Date: Sat, 22 Mar 2014 08:50:58 -0700
Subject: [PATCH 3/7] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump
========
https://hg.mozilla.org/integration/gaia-central/rev/315b9974356f
Author: Arthur Chen
Desc: Revert "Bug 964180 - Introduce AMD to settings app"
This reverts commit d9fb81e2d83dae21e53496b697cdd10ad6a2d4fd.
Conflicts:
apps/communications/dialer/test/unit/multi_sim_action_button_test.js
apps/settings/index.html
========
https://hg.mozilla.org/integration/gaia-central/rev/1bd507e97ee3
Author: Arthur Chen
Desc: Revert "Bug 985409 - Fix JSHint issues with test/unit/setup.js"
This reverts commit 5d3e2618af85aa245e4bc06692b9d5df32687745.
---
b2g/config/gaia.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json
index 7a3b6d84b0a..0a08ab61558 100644
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -4,6 +4,6 @@
"branch": "",
"revision": ""
},
- "revision": "fde9b45694924b72c8f38dd485bbca1dd9cf5aa3",
+ "revision": "315b9974356fc29b5afd5dcde874629d3e5ab94e",
"repo_path": "/integration/gaia-central"
}
From c57d19399036748c89a1fa4301fc8e398f7f8aa7 Mon Sep 17 00:00:00 2001
From: B2G Bumper Bot
Date: Sat, 22 Mar 2014 08:56:09 -0700
Subject: [PATCH 4/7] Bumping manifests a=b2g-bump
---
b2g/config/emulator-ics/sources.xml | 2 +-
b2g/config/emulator-jb/sources.xml | 2 +-
b2g/config/emulator-kk/sources.xml | 2 +-
b2g/config/emulator/sources.xml | 2 +-
b2g/config/hamachi/sources.xml | 2 +-
b2g/config/helix/sources.xml | 2 +-
b2g/config/inari/sources.xml | 2 +-
b2g/config/leo/sources.xml | 2 +-
b2g/config/mako/sources.xml | 2 +-
b2g/config/wasabi/sources.xml | 2 +-
10 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml
index 573e2ec4a77..b183eca4bc6 100644
--- a/b2g/config/emulator-ics/sources.xml
+++ b/b2g/config/emulator-ics/sources.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml
index 8f29d833e95..af42d276e07 100644
--- a/b2g/config/emulator-jb/sources.xml
+++ b/b2g/config/emulator-jb/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml
index 026dc1f10c1..0fd2c6900cd 100644
--- a/b2g/config/emulator-kk/sources.xml
+++ b/b2g/config/emulator-kk/sources.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml
index 573e2ec4a77..b183eca4bc6 100644
--- a/b2g/config/emulator/sources.xml
+++ b/b2g/config/emulator/sources.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml
index e9f0a3076d5..07d2d74a3ef 100644
--- a/b2g/config/hamachi/sources.xml
+++ b/b2g/config/hamachi/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml
index d886d4070d9..3e750f49eea 100644
--- a/b2g/config/helix/sources.xml
+++ b/b2g/config/helix/sources.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/b2g/config/inari/sources.xml b/b2g/config/inari/sources.xml
index b414d040e1f..5d3e4cafe89 100644
--- a/b2g/config/inari/sources.xml
+++ b/b2g/config/inari/sources.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/b2g/config/leo/sources.xml b/b2g/config/leo/sources.xml
index 86896c0927c..a93653ff9c1 100644
--- a/b2g/config/leo/sources.xml
+++ b/b2g/config/leo/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/mako/sources.xml b/b2g/config/mako/sources.xml
index 23563c2c828..23d85332b01 100644
--- a/b2g/config/mako/sources.xml
+++ b/b2g/config/mako/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml
index 1b32f02470e..bed6802e43d 100644
--- a/b2g/config/wasabi/sources.xml
+++ b/b2g/config/wasabi/sources.xml
@@ -17,7 +17,7 @@
-
+
From 3f66fe9da44c496634ee60eb7956f647dc494ec7 Mon Sep 17 00:00:00 2001
From: B2G Bumper Bot
Date: Sat, 22 Mar 2014 09:16:09 -0700
Subject: [PATCH 5/7] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump
========
https://hg.mozilla.org/integration/gaia-central/rev/4dff379346b2
Author: Arthur Chen
Desc: Merge pull request #17373 from crh0716/985090
Bug 985090 - Fix voicemail number migration issue and refactor r=jaoo
========
https://hg.mozilla.org/integration/gaia-central/rev/4170f2f3c3e9
Author: Arthur Chen
Desc: Bug 985090 - Fix voicemail number migration issue and refactor
---
b2g/config/gaia.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json
index 0a08ab61558..9aa5b58445a 100644
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -4,6 +4,6 @@
"branch": "",
"revision": ""
},
- "revision": "315b9974356fc29b5afd5dcde874629d3e5ab94e",
+ "revision": "4dff379346b266bd93f48291a64cfc90af5d7daa",
"repo_path": "/integration/gaia-central"
}
From 41e3a02a56014947e58534c16e30b32e9ee688c0 Mon Sep 17 00:00:00 2001
From: B2G Bumper Bot
Date: Sat, 22 Mar 2014 09:21:15 -0700
Subject: [PATCH 6/7] Bumping manifests a=b2g-bump
---
b2g/config/emulator-ics/sources.xml | 2 +-
b2g/config/emulator-jb/sources.xml | 2 +-
b2g/config/emulator-kk/sources.xml | 2 +-
b2g/config/emulator/sources.xml | 2 +-
b2g/config/hamachi/sources.xml | 2 +-
b2g/config/helix/sources.xml | 2 +-
b2g/config/inari/sources.xml | 2 +-
b2g/config/leo/sources.xml | 2 +-
b2g/config/mako/sources.xml | 2 +-
b2g/config/wasabi/sources.xml | 2 +-
10 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml
index b183eca4bc6..23804b308d0 100644
--- a/b2g/config/emulator-ics/sources.xml
+++ b/b2g/config/emulator-ics/sources.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml
index af42d276e07..8ca672a8224 100644
--- a/b2g/config/emulator-jb/sources.xml
+++ b/b2g/config/emulator-jb/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml
index 0fd2c6900cd..cce7839f36c 100644
--- a/b2g/config/emulator-kk/sources.xml
+++ b/b2g/config/emulator-kk/sources.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml
index b183eca4bc6..23804b308d0 100644
--- a/b2g/config/emulator/sources.xml
+++ b/b2g/config/emulator/sources.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml
index 07d2d74a3ef..ce457b7ec8a 100644
--- a/b2g/config/hamachi/sources.xml
+++ b/b2g/config/hamachi/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml
index 3e750f49eea..8adbf6f2ae4 100644
--- a/b2g/config/helix/sources.xml
+++ b/b2g/config/helix/sources.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/b2g/config/inari/sources.xml b/b2g/config/inari/sources.xml
index 5d3e4cafe89..e74c486856f 100644
--- a/b2g/config/inari/sources.xml
+++ b/b2g/config/inari/sources.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/b2g/config/leo/sources.xml b/b2g/config/leo/sources.xml
index a93653ff9c1..434806c4312 100644
--- a/b2g/config/leo/sources.xml
+++ b/b2g/config/leo/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/mako/sources.xml b/b2g/config/mako/sources.xml
index 23d85332b01..5ad0c5ee086 100644
--- a/b2g/config/mako/sources.xml
+++ b/b2g/config/mako/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml
index bed6802e43d..53658498a03 100644
--- a/b2g/config/wasabi/sources.xml
+++ b/b2g/config/wasabi/sources.xml
@@ -17,7 +17,7 @@
-
+
From 090b10cefd798877cc0e56fc221fdc59fe9c6cbc Mon Sep 17 00:00:00 2001
From: Reuben Morais
Date: Sat, 22 Mar 2014 16:07:44 -0300
Subject: [PATCH 7/7] Bug 949537 - Setup substring matching for Chilean
numbers. r=gwagner
---
b2g/app/b2g.js | 1 +
dom/contacts/tests/mochitest.ini | 1 +
dom/contacts/tests/shared.js | 6 +-
.../tests/test_contacts_international.html | 44 ++--
.../test_contacts_substringmatching.html | 43 ++++
.../test_contacts_substringmatchingCL.html | 204 ++++++++++++++++++
6 files changed, 277 insertions(+), 22 deletions(-)
create mode 100644 dom/contacts/tests/test_contacts_substringmatchingCL.html
diff --git a/b2g/app/b2g.js b/b2g/app/b2g.js
index 52ed0fe9511..38bed82e9a6 100644
--- a/b2g/app/b2g.js
+++ b/b2g/app/b2g.js
@@ -417,6 +417,7 @@ pref("dom.global-constructor.disable.mozContact", false);
pref("dom.phonenumber.substringmatching.BR", 8);
pref("dom.phonenumber.substringmatching.CO", 10);
pref("dom.phonenumber.substringmatching.VE", 7);
+pref("dom.phonenumber.substringmatching.CL", 8);
// WebAlarms
pref("dom.mozAlarms.enabled", true);
diff --git a/dom/contacts/tests/mochitest.ini b/dom/contacts/tests/mochitest.ini
index 1c50ccd2c13..d1612db8eb5 100644
--- a/dom/contacts/tests/mochitest.ini
+++ b/dom/contacts/tests/mochitest.ini
@@ -13,6 +13,7 @@ skip-if = (toolkit == 'gonk' && debug) #debug-only failure
[test_contacts_international.html]
[test_contacts_substringmatching.html]
[test_contacts_substringmatchingVE.html]
+[test_contacts_substringmatchingCL.html]
[test_migration.html]
support-files =
test_migration_chrome.js
diff --git a/dom/contacts/tests/shared.js b/dom/contacts/tests/shared.js
index 41da27b2f77..864dc34a6b7 100644
--- a/dom/contacts/tests/shared.js
+++ b/dom/contacts/tests/shared.js
@@ -402,15 +402,17 @@ function next() {
}
}
+SimpleTest.waitForExplicitFinish();
+
function start_tests() {
// Skip tests on Android < 4.0 due to test failures on tbpl (see bugs 897924 & 888891)
let androidVersion = SpecialPowers.Cc['@mozilla.org/system-info;1']
.getService(SpecialPowers.Ci.nsIPropertyBag2)
.getProperty('version');
if (!isAndroid || androidVersion >= 14) {
- SimpleTest.waitForExplicitFinish();
- addLoadEvent(next);
+ next();
} else {
ok(true, "Skip tests on Android < 4.0 (bugs 897924 & 888891");
+ SimpleTest.finish();
}
}
diff --git a/dom/contacts/tests/test_contacts_international.html b/dom/contacts/tests/test_contacts_international.html
index e05c3b62671..f01e21b903c 100644
--- a/dom/contacts/tests/test_contacts_international.html
+++ b/dom/contacts/tests/test_contacts_international.html
@@ -43,13 +43,13 @@ var properties2 = {
};
var number3 = {
- international1: "0041557932012345",
- international2: "+557932012345"
+ local: "7932012345",
+ international: "+557932012345"
};
var properties3 = {
name: ["Testname2"],
- tel: [{value: number3.international2}]
+ tel: [{value: number3.international}]
};
var req;
@@ -95,9 +95,9 @@ var steps = [
filterValue: number1.local};
req = mozContacts.find(options);
req.onsuccess = function () {
- ok(req.result.length == 1, "Found exactly 1 contact.");
+ ise(req.result.length, 1, "Found exactly 1 contact.");
findResult1 = req.result[0];
- ok(findResult1.id == sample_id1, "Same ID");
+ ise(findResult1.id, sample_id1, "Same ID");
next();
};
req.onerror = onFailure;
@@ -109,7 +109,7 @@ var steps = [
filterValue: number1.international};
req = mozContacts.find(options);
req.onsuccess = function () {
- ok(req.result.length == 0, "Found exactly 0 contacts.");
+ ise(req.result.length, 0, "Found exactly 0 contacts.");
next();
};
req.onerror = onFailure;
@@ -122,7 +122,7 @@ var steps = [
filterValue: shortNumber};
req = mozContacts.find(options);
req.onsuccess = function() {
- ok(req.result.length == 0, "The prefix short number should not match any contact.");
+ ise(req.result.length, 0, "The prefix short number should not match any contact.");
next();
};
req.onerror = onFailure;
@@ -135,7 +135,7 @@ var steps = [
filterValue: shortNumber};
req = mozContacts.find(options);
req.onsuccess = function() {
- ok(req.result.length == 0, "The suffix short number should not match any contact.");
+ ise(req.result.length, 0, "The suffix short number should not match any contact.");
next();
};
req.onerror = onFailure;
@@ -147,7 +147,7 @@ var steps = [
filterValue: shortNumber};
req = mozContacts.find(options);
req.onsuccess = function() {
- ok(req.result.length == 1, "Found the contact equally matching the shortNumber.");
+ ise(req.result.length, 1, "Found the contact equally matching the shortNumber.");
next();
};
req.onerror = onFailure;
@@ -171,7 +171,7 @@ var steps = [
filterValue: number1.local};
req = mozContacts.find(options);
req.onsuccess = function () {
- ok(req.result.length == 0, "Found exactly 0 contact.");
+ ise(req.result.length, 0, "Found exactly 0 contact.");
next();
};
req.onerror = onFailure;
@@ -183,7 +183,7 @@ var steps = [
filterValue: number1.international};
req = mozContacts.find(options);
req.onsuccess = function () {
- ok(req.result.length == 0, "Found exactly 0 contact.");
+ ise(req.result.length, 0, "Found exactly 0 contact.");
next();
};
req.onerror = onFailure;
@@ -195,9 +195,9 @@ var steps = [
filterValue: number2.local};
req = mozContacts.find(options);
req.onsuccess = function () {
- ok(req.result.length == 1, "Found exactly 1 contact.");
+ ise(req.result.length, 1, "Found exactly 1 contact.");
findResult1 = req.result[0];
- ok(findResult1.id == sample_id1, "Same ID");
+ ise(findResult1.id, sample_id1, "Same ID");
next();
};
req.onerror = onFailure;
@@ -209,7 +209,7 @@ var steps = [
filterValue: number2.international};
req = mozContacts.find(options);
req.onsuccess = function () {
- ok(req.result.length == 0, "Found exactly 1 contact.");
+ ise(req.result.length, 0, "Found exactly 1 contact.");
next();
};
req.onerror = onFailure;
@@ -224,7 +224,7 @@ var steps = [
req.onerror = onFailure;
},
function () {
- ok(true, "Adding a new contact with country code");
+ ok(true, "Adding a contact with a Brazilian country code");
createResult1 = new mozContact(properties3);
req = navigator.mozContacts.save(createResult1);
req.onsuccess = function () {
@@ -235,15 +235,15 @@ var steps = [
req.onerror = onFailure;
},
function () {
- ok(true, "Searching for international number with prefix");
+ ok(true, "Searching for Brazilian number using local number");
var options = {filterBy: ["tel"],
filterOp: "match",
- filterValue: number3.international1};
+ filterValue: number3.local};
req = mozContacts.find(options);
req.onsuccess = function () {
- ok(req.result.length == 1, "Found exactly 1 contact.");
+ ise(req.result.length, 1, "Found exactly 1 contact.");
findResult1 = req.result[0];
- ok(findResult1.id == sample_id1, "Same ID");
+ ise(findResult1.id, sample_id1, "Same ID");
next();
};
req.onerror = onFailure;
@@ -263,7 +263,11 @@ var steps = [
}
];
-start_tests();
+SpecialPowers.pushPrefEnv({
+ set: [
+ ["ril.lastKnownSimMcc", "000"]
+ ]
+}, start_tests);
+
+Mozilla Bug 949537
+
+
+
+
+
+
+
+
+
diff --git a/dom/contacts/tests/test_contacts_substringmatching.html b/dom/contacts/tests/test_contacts_substringmatching.html
index dffbb4beab2..4e86166116d 100644
--- a/dom/contacts/tests/test_contacts_substringmatching.html
+++ b/dom/contacts/tests/test_contacts_substringmatching.html
@@ -45,6 +45,15 @@ var prop4 = {
tel: [{ value: "(0414) 233-9888" }]
};
+var brazilianNumber = {
+ international1: "0041557932012345",
+ international2: "+557932012345"
+};
+
+var prop5 = {
+ tel: [{value: brazilianNumber.international2}]
+};
+
var req;
var steps = [
function () {
@@ -293,6 +302,40 @@ var steps = [
}
req.onerror = onFailure;
},
+ function () {
+ ok(true, "Adding a new contact with a Brazilian country code");
+ createResult1 = new mozContact(prop5);
+ req = navigator.mozContacts.save(createResult1);
+ req.onsuccess = function () {
+ ok(createResult1.id, "The contact now has an ID.");
+ sample_id1 = createResult1.id;
+ next();
+ };
+ req.onerror = onFailure;
+ },
+ function () {
+ ok(true, "Searching for international number with prefix");
+ var options = {filterBy: ["tel"],
+ filterOp: "match",
+ filterValue: brazilianNumber.international1};
+ req = mozContacts.find(options);
+ req.onsuccess = function () {
+ ok(req.result.length == 1, "Found exactly 1 contact.");
+ findResult1 = req.result[0];
+ ok(findResult1.id == sample_id1, "Same ID");
+ next();
+ };
+ req.onerror = onFailure;
+ },
+ function () {
+ ok(true, "Deleting database");
+ req = mozContacts.clear()
+ req.onsuccess = function () {
+ ok(true, "Deleted the database");
+ next();
+ }
+ req.onerror = onFailure;
+ },
function () {
ok(true, "all done!\n");
SpecialPowers.clearUserPref("dom.phonenumber.substringmatching.BR");
diff --git a/dom/contacts/tests/test_contacts_substringmatchingCL.html b/dom/contacts/tests/test_contacts_substringmatchingCL.html
new file mode 100644
index 00000000000..b248eefd848
--- /dev/null
+++ b/dom/contacts/tests/test_contacts_substringmatchingCL.html
@@ -0,0 +1,204 @@
+
+
+
+