diff --git a/browser/components/loop/test/desktop-local/README.md b/browser/components/loop/test/desktop-local/README.md index a306e28646ead..5f459e32fc4a3 100644 --- a/browser/components/loop/test/desktop-local/README.md +++ b/browser/components/loop/test/desktop-local/README.md @@ -6,10 +6,16 @@ and the Chai Assertion Library's [BDD interface][2]. [1]: http://visionmedia.github.io/mocha/ [2]: http://chaijs.com/api/bdd/ -Aim your browser at the index.html in this directory on your localhost using a file: or HTTP URL to run the tests. +Aim your browser at the index.html in this directory on your localhost using +a file: or HTTP URL to run the tests. Alternately, from the top-level of your +Gecko source directory, execute: + +``` +./mach marionette-test browser/components/loop/test/manifest.ini +``` Next steps: -* hook up to Marionette test suite so that they can be run by Tbpl -* run via mach command-line -* run using JS http server so the property security context for DOM elements is used + +* run using JS http server so the property security context for DOM elements +is used diff --git a/browser/components/loop/test/desktop-local/index.html b/browser/components/loop/test/desktop-local/index.html index a4ac0a70c4ed3..718fd74e8b448 100644 --- a/browser/components/loop/test/desktop-local/index.html +++ b/browser/components/loop/test/desktop-local/index.html @@ -30,7 +30,7 @@ }, getStrings: function() { return []; - }, + } }; window.Components = {fake: true, utils: {import: function(){}}}; window.Services = {fake: true, prefs: {getCharPref: function() { @@ -47,6 +47,7 @@ @@ -64,7 +65,7 @@ diff --git a/browser/components/loop/test/desktop-local/panel_test.js b/browser/components/loop/test/desktop-local/panel_test.js index 07b6e07103539..4f0d79ed07339 100644 --- a/browser/components/loop/test/desktop-local/panel_test.js +++ b/browser/components/loop/test/desktop-local/panel_test.js @@ -2,7 +2,7 @@ * 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/. */ -/* global loop, sinon */ +/*global loop, sinon */ var expect = chai.expect; diff --git a/browser/components/loop/test/desktop-local/test_desktop_all.py b/browser/components/loop/test/desktop-local/test_desktop_all.py new file mode 100644 index 0000000000000..877844d58ca0a --- /dev/null +++ b/browser/components/loop/test/desktop-local/test_desktop_all.py @@ -0,0 +1,16 @@ +# need to get this dir in the path so that we make the import work +import os +import sys +sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'shared')) + +from frontend_tester import BaseTestFrontendUnits + + +class TestDesktopUnits(BaseTestFrontendUnits): + + def setUp(self): + super(TestDesktopUnits, self).setUp() + self.set_server_prefix("browser/components/loop/test/desktop-local/") + + def test_units(self): + self.check_page("index.html") diff --git a/browser/components/loop/test/manifest.ini b/browser/components/loop/test/manifest.ini new file mode 100644 index 0000000000000..041dc95cfb739 --- /dev/null +++ b/browser/components/loop/test/manifest.ini @@ -0,0 +1,7 @@ +[DEFAULT] +b2g = false +browser = true +qemu = false + +[shared/test_shared_all.py] +[desktop-local/test_desktop_all.py]