Beispiel #1
0
 def test_reset_clears_storage_when_set(self):
     session = Session("selenium_marionette_clear_storage", app)
     session.visit("/with_js")
     session.find("css", "#set-storage").click()
     session.reset()
     session.visit("/with_js")
     assert session.evaluate_script("window.localStorage.length") == 0
     assert session.evaluate_script("window.sessionStorage.length") == 0
Beispiel #2
0
 def test_reset_does_not_clear_either_storage_by_default(self):
     session = Session("selenium_marionette", app)
     session.visit("/with_js")
     session.find("css", "#set-storage").click()
     session.reset()
     session.visit("/with_js")
     assert session.evaluate_script("window.localStorage.length") > 0
     assert session.evaluate_script("window.sessionStorage.length") > 0