Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(667)

Unified Diff: tools/telemetry/telemetry/browser_unittest.py

Issue 12260020: [Telemetry] Fix tab list updating with connected tabs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: New unit tests. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/telemetry/telemetry/tab_list_backend.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/browser_unittest.py
diff --git a/tools/telemetry/telemetry/browser_unittest.py b/tools/telemetry/telemetry/browser_unittest.py
index ca28dd5e4d23f98699c5989add19f42c842bcf1f..f26d2805e48d5ed3c972edcd63f739a43553ce8d 100644
--- a/tools/telemetry/telemetry/browser_unittest.py
+++ b/tools/telemetry/telemetry/browser_unittest.py
@@ -67,3 +67,21 @@ class BrowserTest(unittest.TestCase):
with browser_to_create.Create() as b:
b.tabs[0].Navigate('http://www.google.com/')
b.tabs[0].WaitForDocumentReadyStateToBeInteractiveOrBetter()
+
+ def testTabCallByReference(self):
+ options = options_for_unittests.GetCopy()
+ browser_to_create = browser_finder.FindBrowser(options)
+ with browser_to_create.Create() as b:
+ tab = b.tabs[0]
+ tab.Navigate('http://www.google.com/')
+ b.tabs[0].WaitForDocumentReadyStateToBeInteractiveOrBetter()
+
+ def testCloseReferencedTab(self):
+ options = options_for_unittests.GetCopy()
+ browser_to_create = browser_finder.FindBrowser(options)
+ with browser_to_create.Create() as b:
+ b.tabs.New()
+ tab = b.tabs[0]
+ tab.Navigate('http://www.google.com/')
+ tab.Close()
+ self.assertEquals(1, len(b.tabs))
« no previous file with comments | « no previous file | tools/telemetry/telemetry/tab_list_backend.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698