diff options
author | jsbell@chromium.org <jsbell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-25 19:57:46 +0000 |
---|---|---|
committer | jsbell@chromium.org <jsbell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-25 19:57:46 +0000 |
commit | 7c89ccd9a2087d22087e678f9c06772ed51185c2 (patch) | |
tree | fd7d6cafa586a5ef12e9504b13b9ff99411fa4b4 /chrome/test/functional | |
parent | a9b82d3bc2203a27694ccac3261a6a80a1f27259 (diff) | |
download | chromium_src-7c89ccd9a2087d22087e678f9c06772ed51185c2.zip chromium_src-7c89ccd9a2087d22087e678f9c06772ed51185c2.tar.gz chromium_src-7c89ccd9a2087d22087e678f9c06772ed51185c2.tar.bz2 |
IndexedDB: Ensure database connections are closed on tab close.
BUG=80111
TEST=
Review URL: https://chromiumcodereview.appspot.com/9121016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119104 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/functional')
-rwxr-xr-x | chrome/test/functional/indexeddb.py | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/chrome/test/functional/indexeddb.py b/chrome/test/functional/indexeddb.py index 5e4e560..162aa9d 100755 --- a/chrome/test/functional/indexeddb.py +++ b/chrome/test/functional/indexeddb.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright (c) 2011 The Chromium Authors. All rights reserved. +# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -59,5 +59,27 @@ class IndexedDBTest(pyauto.PyUITest): expect_retval='pass - part3 - rolled back'), msg='VERSION_CHANGE not completely aborted') + def testConnectionsClosedOnTabClose(self): + """Verify that open DB connections are closed when a tab is destroyed.""" + + url = self.GetHttpURLForDataPath('indexeddb', 'version_change_blocked.html') + + self.NavigateToURL(url + '#tab1') + pid = self.GetBrowserInfo()['windows'][0]['tabs'][0]['renderer_pid'] + self.assertTrue(self.WaitUntil(self.GetActiveTabTitle, + expect_retval='setVersion(1) complete'), + msg='Version change failed') + + # Start to a different URL to force a new renderer process + self.AppendTab(pyauto.GURL('about:blank')) + self.NavigateToURL(url + '#tab2') + self.assertTrue(self.WaitUntil(self.GetActiveTabTitle, + expect_retval='setVersion(2) blocked'), + msg='Version change not blocked as expected') + self.KillRendererProcess(pid) + self.assertTrue(self.WaitUntil(self.GetActiveTabTitle, + expect_retval='setVersion(2) complete'), + msg='Version change never unblocked') + if __name__ == '__main__': pyauto_functional.Main() |