Bug 968709 - Add a marionette test case to Bluetooth set to make sure the URL of Marionette client is correct. r=vyang

Few marionette tests in unit-test set may navigate to specific URL and
wouldn't restore the URL of marionette client when the tests end.
Navigate the URL to default value before running Bluetooth test to make
sure the correctness of test.
This commit is contained in:
Jamin Liu 2014-06-18 00:20:00 -04:00
parent d353900c30
commit 06b1c291b8
2 changed files with 19 additions and 0 deletions

View File

@ -3,6 +3,7 @@ b2g = true
browser = false
qemu = true
[test_navigate_to_default_url.py]
[test_dom_BluetoothManager_enabled.js]
[test_dom_BluetoothManager_adapteradded.js]
[test_dom_BluetoothAdapter_setters.js]

View File

@ -0,0 +1,18 @@
# 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/.
from marionette_test import MarionetteTestCase
class testNavigateToDefault(MarionetteTestCase):
def setUp(self):
MarionetteTestCase.setUp(self)
# Sets an appropriate timeout for this test.
# P.S. The timeout of next test wouldn't be affected by this statement.
self.marionette.timeouts(self.marionette.TIMEOUT_PAGE, 90000)
def test_navigate_to_default_url(self):
try:
self.marionette.navigate("app://system.gaiamobile.org/index.html")
except:
self.assertTrue(False, "Can not navigate to system app.")