testing chrome extensions

when testing chrome extensions, somehow we need to set window.name again after window.location.