Commit dc6ff756 authored by Blake Kaplan's avatar Blake Kaplan
Browse files

Bug 1507000 - Look for the script in the right directory r=mccr8

I cribbed this from another test and verified that it works.

Differential Revision: https://phabricator.services.mozilla.com/D11828

--HG--
extra : moz-landing-system : lando
parent 1d13c4cc
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -3,10 +3,7 @@ import uuid
import hashlib
import time

resourcePath = os.getcwd() + "/fetch/sec-metadata/resources/"

def main(request, response):

  ## Get the query parameter (key) from URL ##
  ## Tests will record POST requests (CSP Report) and GET (rest) ##
  if request.GET:
@@ -57,7 +54,8 @@ def main(request, response):
    ## Return a valid SharedWorker ##
    if key.startswith("sharedworker"):
      response.headers.set("Content-Type", "application/javascript")
      file = open(resourcePath + "sharedWorker.js", "r")
      file = open(os.path.join(request.doc_root, "fetch", "sec-metadata",
                               "resources", "sharedWorker.js"), "r")
      shared_worker = file.read()
      file.close()
      return shared_worker