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

Side by Side Diff: tools/telemetry/telemetry/core/browser_unittest.py

Issue 12278015: [Telemetry] Reorganize everything. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-add shebangs. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 import unittest 4 import unittest
5 5
6 from telemetry import browser_finder 6 from telemetry.core import browser_finder
7 from telemetry import options_for_unittests 7 from telemetry.test import options_for_unittests
8 8
9 class BrowserTest(unittest.TestCase): 9 class BrowserTest(unittest.TestCase):
10 def testBrowserCreation(self): 10 def testBrowserCreation(self):
11 options = options_for_unittests.GetCopy() 11 options = options_for_unittests.GetCopy()
12 browser_to_create = browser_finder.FindBrowser(options) 12 browser_to_create = browser_finder.FindBrowser(options)
13 if not browser_to_create: 13 if not browser_to_create:
14 raise Exception('No browser found, cannot continue test.') 14 raise Exception('No browser found, cannot continue test.')
15 with browser_to_create.Create() as b: 15 with browser_to_create.Create() as b:
16 self.assertEquals(1, len(b.tabs)) 16 self.assertEquals(1, len(b.tabs))
17 17
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 def testCloseReferencedTab(self): 79 def testCloseReferencedTab(self):
80 options = options_for_unittests.GetCopy() 80 options = options_for_unittests.GetCopy()
81 browser_to_create = browser_finder.FindBrowser(options) 81 browser_to_create = browser_finder.FindBrowser(options)
82 with browser_to_create.Create() as b: 82 with browser_to_create.Create() as b:
83 b.tabs.New() 83 b.tabs.New()
84 tab = b.tabs[0] 84 tab = b.tabs[0]
85 tab.Navigate('http://www.google.com/') 85 tab.Navigate('http://www.google.com/')
86 tab.Close() 86 tab.Close()
87 self.assertEquals(1, len(b.tabs)) 87 self.assertEquals(1, len(b.tabs))
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/core/browser_options_unittest.py ('k') | tools/telemetry/telemetry/core/chrome/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698