ZaDarkSide / js-test-driver

Automatically exported from code.google.com/p/js-test-driver
0 stars 0 forks source link

JavaScript error when embedding inside IFrame #313

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run JSTestDriver server. I.e: java -jar ./lib/JsTestDriver-1.3.3d.jar --port 
9876
2. Instead of typing http://localhost:9876/capture on browser location, create 
an iframe inside another web server document (i.e: http://localhost/index.html) 
and set the iframe src to capture. Something like:

http://localhost/index.html:
<iframe src="http://localhost:9876/capture" height="100px" 
width="100%"></iframe>

3. Access http://localhost/index.html

What is the expected output? What do you see instead?

You will see a JavaScript exception on browser output saying Permission error 
accessing toString.

What version of the product are you using? On what operating system?

JsTestDriver-1.3.3d.jar/MacOS/Chrome+Firefox.

Root cause:
---------

This code on some JsTestDriver JavaScript files causes the issue:

top.location.toString();

Solution:
-------

Change to window.location.toString();

Please provide any additional information below.

Original issue reported on code.google.com by tan....@gmail.com on 23 Dec 2011 at 1:49