diff options
author | tengs@chromium.org <tengs@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-30 21:53:53 +0000 |
---|---|---|
committer | tengs@chromium.org <tengs@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-30 21:53:53 +0000 |
commit | 6bf1bceebc9acc724dd9831554ea582eabf82d08 (patch) | |
tree | 6bc95744a91934138e126a653bc0fa38485e6722 /tools/telemetry | |
parent | 86115b317ee8fd39037ae89f6052b8fd83c3a040 (diff) | |
download | chromium_src-6bf1bceebc9acc724dd9831554ea582eabf82d08.zip chromium_src-6bf1bceebc9acc724dd9831554ea582eabf82d08.tar.gz chromium_src-6bf1bceebc9acc724dd9831554ea582eabf82d08.tar.bz2 |
Fix InspectorMemoryTest.testGetDOMStats to have consistent
behaviour on CrOS and desktop versions of Chrome. Starting the
browser in CrOS requires navigating through an initial setup
that does not leave us with a tab at "chrome://newtab". This workaround
runs the test in a new tab on all platforms for consistency.
BUG=235634
TEST=InspectorMemoryTest.testGetDOMStats passes on cros and system
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/14672002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197490 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/telemetry')
-rw-r--r-- | tools/telemetry/telemetry/core/chrome/inspector_memory_unittest.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tools/telemetry/telemetry/core/chrome/inspector_memory_unittest.py b/tools/telemetry/telemetry/core/chrome/inspector_memory_unittest.py index 69b6d01..9baa507 100644 --- a/tools/telemetry/telemetry/core/chrome/inspector_memory_unittest.py +++ b/tools/telemetry/telemetry/core/chrome/inspector_memory_unittest.py @@ -11,11 +11,15 @@ class InspectorMemoryTest(tab_test_case.TabTestCase): '..', '..', '..', 'unittest_data') self._browser.SetHTTPServerDirectories(unittest_data_dir) - self._tab.Navigate( + # Due to an issue with CrOS, we create a new tab here rather than + # using self._tab to get a consistent starting page on all platforms + tab = self._browser.tabs.New() + + tab.Navigate( self._browser.http_server.UrlOf('dom_counter_sample.html')) - self._tab.WaitForDocumentReadyStateToBeComplete() + tab.WaitForDocumentReadyStateToBeComplete() - counts = self._tab.dom_stats - self.assertEqual(counts['document_count'], 1) - self.assertEqual(counts['node_count'], 14) + counts = tab.dom_stats + self.assertEqual(counts['document_count'], 2) + self.assertEqual(counts['node_count'], 18) self.assertEqual(counts['event_listener_count'], 2) |