LiTiang / js-test-driver

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

Reset document.location and remove cookies before each test run #144

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. write a test that sets document.location.hash or a cookie
2. rerun the test

What is the expected output? What do you see instead?
the state from the previous run conflicts with the new run because 
document.location and cookie store are not being reset.

What version of the product are you using? On what operating system?
1.2.2 on mac & linux & windows

Please provide any additional information below.

Original issue reported on code.google.com by imi...@google.com on 4 Oct 2010 at 3:45

GoogleCodeExporter commented 9 years ago
As a workaround, clean up the modified global state after each test in a 
tearDrown method.

Original comment by corbinrs...@gmail.com on 4 Oct 2010 at 4:43

GoogleCodeExporter commented 9 years ago
yes, that's what I do now, but it would be nice if jstd took care of the most 
commonly used global state automatically.

Original comment by imi...@google.com on 4 Oct 2010 at 7:08

GoogleCodeExporter commented 9 years ago
Please define "commonly used global state"....

Original comment by corbinrs...@gmail.com on 9 Feb 2011 at 11:23

GoogleCodeExporter commented 9 years ago
document, cookies, location, (local storage)?

Original comment by imi...@google.com on 10 Feb 2011 at 12:52