Bug 1188638 - TPS should load from the webserver instead of the file scheme. r=jmaher
authorBenoit Girard <b56girard@gmail.com>
Fri, 14 Aug 2015 16:45:49 -0400
changeset 994 869a812af5d2
parent 993 55711f8341c5
child 995 11b48cfc4512
push id684
push userb56girard@gmail.com
push dateFri, 14 Aug 2015 21:02:16 +0000
reviewersjmaher
bugs1188638
Bug 1188638 - TPS should load from the webserver instead of the file scheme. r=jmaher
talos/page_load_test/tabswitch/bootstrap.js
talos/test.py
--- a/talos/page_load_test/tabswitch/bootstrap.js
+++ b/talos/page_load_test/tabswitch/bootstrap.js
@@ -249,17 +249,18 @@ function handleFile(win, file) {
   localFile.initWithPath(file);
   let localURI = Services.io.newFileURI(localFile);
   let req = new win.XMLHttpRequest();
   req.open('get', localURI.spec, false);
   req.send(null);
 
 
   let testURLs = [];
-  let parent = localURI.spec.split(localFile.leafName)[0];
+  let server = Services.prefs.getCharPref("addon.test.tabswitch.webserver");
+  let parent = server + "/page_load_test/";
   let lines = req.responseText.split('<a href=\"');
   testURLs = [];
   lines.forEach(function(a) {
     if (a.split('\"')[0] != "") {
       testURLs.push(parent + "tp5n/" + a.split('\"')[0]);
     }
   });
 
--- a/talos/test.py
+++ b/talos/test.py
@@ -250,17 +250,18 @@ class tps(PageloaderTest):
     extensions = '${talos}/page_load_test/tabswitch'
     tpmanifest = '${talos}/page_load_test/tabswitch/tps.manifest'
     tppagecycles = 5
     sps_profile_entries = 1000000
     tploadnocache = True
     preferences = {
         'addon.test.tabswitch.urlfile': os.path.join('${talos}',
                                                      'page_load_test',
-                                                     'tp5o.html')
+                                                     'tp5o.html'),
+        'addon.test.tabswitch.webserver': '${webserver}',
     }
 
 
 @register_test()
 class tart(PageloaderTest):
     """
     Tab Animation Regression Test
     Tests tab animation on these cases: