diff options
-rwxr-xr-x | chrome/test/functional/indexeddb.py | 10 | ||||
-rw-r--r-- | chrome/test/functional/test_utils.py | 5 |
2 files changed, 9 insertions, 6 deletions
diff --git a/chrome/test/functional/indexeddb.py b/chrome/test/functional/indexeddb.py index 162aa9d..87a3c68 100755 --- a/chrome/test/functional/indexeddb.py +++ b/chrome/test/functional/indexeddb.py @@ -5,16 +5,12 @@ import pyauto_functional import pyauto +import test_utils class IndexedDBTest(pyauto.PyUITest): """Test of IndexedDB.""" - def _CrashBrowser(self): - """Crashes the browser by navigating to special URL""" - crash_url = 'about:inducebrowsercrashforrealz' - self.NavigateToURL(crash_url) - def testIndexedDBNullKeyPathPersistence(self): """Verify null key path persists after restarting browser.""" @@ -50,7 +46,8 @@ class IndexedDBTest(pyauto.PyUITest): expect_retval='pass - part2 - crash me'), msg='Failed to start transaction') - self._CrashBrowser() + + test_utils.CrashBrowser(self) self.RestartBrowser(clear_profile=False) @@ -81,5 +78,6 @@ class IndexedDBTest(pyauto.PyUITest): expect_retval='setVersion(2) complete'), msg='Version change never unblocked') + if __name__ == '__main__': pyauto_functional.Main() diff --git a/chrome/test/functional/test_utils.py b/chrome/test/functional/test_utils.py index 1c3e7ae..41eee98 100644 --- a/chrome/test/functional/test_utils.py +++ b/chrome/test/functional/test_utils.py @@ -21,6 +21,11 @@ import pyauto_utils """Commonly used functions for PyAuto tests.""" +def CrashBrowser(test): + """Crashes the browser by navigating to special URL.""" + test.NavigateToURL('about:inducebrowsercrashforrealz') + + def CopyFileFromDataDirToDownloadDir(test, file_path): """Copy a file from data directory to downloads directory. |