Bug 994485 Make standalone tests work with combined repositories/changed file layout, and fix the standalone server. r=dmose

This commit is contained in:
Mark Banner 2014-05-29 21:25:39 +01:00
parent 81fbf5b575
commit 59795d70d3
5 changed files with 24 additions and 3 deletions

View File

@ -5,6 +5,9 @@
var express = require('express'); var express = require('express');
var app = express(); var app = express();
// This lets /test/ be mapped to the right place for running tests
app.use(express.static(__dirname + '/../'));
// This lets /content/ be mappy right for the static contents.
app.use(express.static(__dirname + '/')); app.use(express.static(__dirname + '/'));
app.listen(3000); app.listen(3000);

View File

@ -12,6 +12,7 @@
<ul> <ul>
<li><a href="shared/">Shared tests</a></li> <li><a href="shared/">Shared tests</a></li>
<li><a href="desktop-local/">Local tests</a></li> <li><a href="desktop-local/">Local tests</a></li>
</ul> <li><a href="standalone/">Standalone tests</a></li>
</ul>
</body> </body>
</html> </html>

View File

@ -5,3 +5,4 @@ qemu = false
[shared/test_shared_all.py] [shared/test_shared_all.py]
[desktop-local/test_desktop_all.py] [desktop-local/test_desktop_all.py]
[standalone/test_standalone_all.py]

View File

@ -33,12 +33,12 @@
<script src="../../content/shared/js/models.js"></script> <script src="../../content/shared/js/models.js"></script>
<script src="../../content/shared/js/views.js"></script> <script src="../../content/shared/js/views.js"></script>
<script src="../../content/shared/js/router.js"></script> <script src="../../content/shared/js/router.js"></script>
<script src="../../content/js/webapp.js"></script> <script src="../../standalone/content/js/webapp.js"></script>
<!-- Test scripts --> <!-- Test scripts -->
<script src="webapp_test.js"></script> <script src="webapp_test.js"></script>
<script> <script>
mocha.run(function () { mocha.run(function () {
$("#mocha").append("<p>Complete.</p>"); $("#mocha").append("<p id='complete'>Complete.</p>");
}); });
</script> </script>
</body> </body>

View File

@ -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/standalone/")
def test_units(self):
self.check_page("index.html")