expose the window xx and use better test cases