FF security.fileuri.strict_origin_policy

51 views
Skip to first unread message

pedz

unread,
May 30, 2010, 5:36:39 PM5/30/10
to jspec
I can't say that I fully understand this and came here for help and
suggestions.

The default for this is "true" which means that you can not go up the
directory tree. Except, you can. In my jspec html files I have:

<script src="../lib/prototype.js" type="text/javascript"></script>

which loads and works just fine. But, somehow, later, the restriction
is imposed and so if I try to run a web worker from "../lib/worker.js"
it fails. My question is not about that... this is mostly for
background.

I'm writing a serverless web application where I'm hoping a user can
point their browser to file:///blah/blah.html and it would start, find
the javascript files and run. I'm using jspec to test this. Since
most users will have the origin policy set to the default, I want to
run my tests with that too. I think the directory layout I have is
fairly standard. I have my top directory for the project itself, a
lib directory for my JS files, and a spec directory and subdirectories
for the JSpec files. That is why I have ../lib/foo.js in my JSpec
HTML test files. And I do: jspec spec/test1.html from the project
home directory.

But with the restrictions, I'm toying with making the spec directory
be the top level directory with maybe "project" as its sub directory
and put my project and its lib, etc directories under that. Then
everything will be "down" from the perspective of the spec directory
and when I ship, I ship from project down.

Is there another way to skin this cat?

Thanks,
Perry
Reply all
Reply to author
Forward
0 new messages