| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import simplejson | 6 import simplejson |
| 7 import os | 7 import os |
| 8 | 8 |
| 9 import pyauto_functional | 9 import pyauto_functional |
| 10 import pyauto | 10 import pyauto |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 | 294 |
| 295 def testDatabasePersistsAfterRelaunch(self): | 295 def testDatabasePersistsAfterRelaunch(self): |
| 296 """Verify database modifications persist after restarting browser.""" | 296 """Verify database modifications persist after restarting browser.""" |
| 297 self.NavigateToURL(self.TEST_PAGE_URL) | 297 self.NavigateToURL(self.TEST_PAGE_URL) |
| 298 self._CreateTable() | 298 self._CreateTable() |
| 299 self._InsertRecord('text') | 299 self._InsertRecord('text') |
| 300 self.RestartBrowser(clear_profile=False) | 300 self.RestartBrowser(clear_profile=False) |
| 301 self.NavigateToURL(self.TEST_PAGE_URL) | 301 self.NavigateToURL(self.TEST_PAGE_URL) |
| 302 self.assertEquals(['text'], self._GetRecords()) | 302 self.assertEquals(['text'], self._GetRecords()) |
| 303 | 303 |
| 304 def testDeleteAndUpdateDatabase(self): | |
| 305 """Verify can modify database after deleting it.""" | |
| 306 self.NavigateToURL(self.TEST_PAGE_URL) | |
| 307 self._CreateTable() | |
| 308 self._InsertRecord('text') | |
| 309 # ClearBrowsingData doesn't return and times out | |
| 310 self.ClearBrowsingData(['COOKIES'], 'EVERYTHING') | |
| 311 self.NavigateToURL(self.TEST_PAGE_URL) | |
| 312 self._CreateTable() | |
| 313 self._InsertRecord('text2') | |
| 314 self.assertEquals(['text2'], self._GetRecords()) | |
| 315 | |
| 316 | |
| 317 if __name__ == '__main__': | 304 if __name__ == '__main__': |
| 318 pyauto_functional.Main() | 305 pyauto_functional.Main() |
| OLD | NEW |