From 38083a1d2916e2769d38e63af763859ab43b514f Mon Sep 17 00:00:00 2001 From: Edgar Chen Date: Tue, 1 Jul 2014 14:40:37 +0800 Subject: [PATCH] Bug 1030002 - Part 2: Test cases for mobileconnection/mobilenetwork permission. r=hsinyi,khuey --- dom/mobileconnection/moz.build | 1 + .../test_mobile_last_known_network.js | 2 +- .../tests/mochitest/mochitest.ini | 5 ++ .../test_mobileconnection_permission.html | 70 +++++++++++++++++++ .../test_mobilenetwork_permission.html | 70 +++++++++++++++++++ dom/mobileconnection/tests/moz.build | 7 ++ 6 files changed, 154 insertions(+), 1 deletion(-) create mode 100644 dom/mobileconnection/tests/mochitest/mochitest.ini create mode 100644 dom/mobileconnection/tests/mochitest/test_mobileconnection_permission.html create mode 100644 dom/mobileconnection/tests/mochitest/test_mobilenetwork_permission.html create mode 100644 dom/mobileconnection/tests/moz.build diff --git a/dom/mobileconnection/moz.build b/dom/mobileconnection/moz.build index 0f03209577ad..6834f77cb132 100644 --- a/dom/mobileconnection/moz.build +++ b/dom/mobileconnection/moz.build @@ -5,3 +5,4 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. PARALLEL_DIRS += ['interfaces', 'src'] +TEST_DIRS += ['tests'] diff --git a/dom/mobileconnection/tests/marionette/test_mobile_last_known_network.js b/dom/mobileconnection/tests/marionette/test_mobile_last_known_network.js index 8fa0eb20f14f..e23df700a5cd 100644 --- a/dom/mobileconnection/tests/marionette/test_mobile_last_known_network.js +++ b/dom/mobileconnection/tests/marionette/test_mobile_last_known_network.js @@ -10,4 +10,4 @@ startTestCommon(function() { is(mobileConnection.lastKnownNetwork, "310-260"); // The emulator's hard coded icc's mcc, mnc codes and spn. is(mobileConnection.lastKnownHomeNetwork, "310-260-Android"); -}); +}, ["mobilenetwork"]); diff --git a/dom/mobileconnection/tests/mochitest/mochitest.ini b/dom/mobileconnection/tests/mochitest/mochitest.ini new file mode 100644 index 000000000000..e04c232e4308 --- /dev/null +++ b/dom/mobileconnection/tests/mochitest/mochitest.ini @@ -0,0 +1,5 @@ +[DEFAULT] +skip-if = toolkit != "gonk" + +[test_mobileconnection_permission.html] +[test_mobilenetwork_permission.html] diff --git a/dom/mobileconnection/tests/mochitest/test_mobileconnection_permission.html b/dom/mobileconnection/tests/mochitest/test_mobileconnection_permission.html new file mode 100644 index 000000000000..89b055982a86 --- /dev/null +++ b/dom/mobileconnection/tests/mochitest/test_mobileconnection_permission.html @@ -0,0 +1,70 @@ + + + + Test to mobileconnection permission + + + + +

+ +
+
+
+ + diff --git a/dom/mobileconnection/tests/mochitest/test_mobilenetwork_permission.html b/dom/mobileconnection/tests/mochitest/test_mobilenetwork_permission.html new file mode 100644 index 000000000000..0e8b94be6009 --- /dev/null +++ b/dom/mobileconnection/tests/mochitest/test_mobilenetwork_permission.html @@ -0,0 +1,70 @@ + + + + Test to mobilenetwork permission + + + + +

+ +
+
+
+ + diff --git a/dom/mobileconnection/tests/moz.build b/dom/mobileconnection/tests/moz.build new file mode 100644 index 000000000000..045aac5ca6a5 --- /dev/null +++ b/dom/mobileconnection/tests/moz.build @@ -0,0 +1,7 @@ +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +MOCHITEST_MANIFESTS += ['mochitest/mochitest.ini']