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

Side by Side Diff: tools/telemetry/telemetry/core/backends/chrome/inspector_memory_unittest.py

Issue 151003003: Fix navigation to unittest files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert changes in memory_cache_http_unittest.py Created 6 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
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 4
5 from telemetry import test
6 from telemetry.core import util
7 from telemetry.unittest import tab_test_case 5 from telemetry.unittest import tab_test_case
8 6
9 7
10 class InspectorMemoryTest(tab_test_case.TabTestCase): 8 class InspectorMemoryTest(tab_test_case.TabTestCase):
11 @test.Disabled('chromeos')
12 def testGetDOMStats(self): 9 def testGetDOMStats(self):
13 self._browser.SetHTTPServerDirectories(util.GetUnittestDataDir()) 10 # Due to an issue with CrOS, we create a new tab here rather than
11 # using the existing tab to get a consistent starting page on all platforms.
12 self._tab = self._browser.tabs.New()
14 13
15 # Due to an issue with CrOS, we create a new tab here rather than 14 self.Navigate('dom_counter_sample.html')
16 # using self._tab to get a consistent starting page on all platforms
17 tab = self._browser.tabs.New()
18 15
19 tab.Navigate( 16 counts = self._tab.dom_stats
20 self._browser.http_server.UrlOf('dom_counter_sample.html'))
21 tab.WaitForDocumentReadyStateToBeComplete()
22
23 counts = tab.dom_stats
24 self.assertEqual(counts['document_count'], 2) 17 self.assertEqual(counts['document_count'], 2)
25 self.assertEqual(counts['node_count'], 18) 18 self.assertEqual(counts['node_count'], 18)
26 self.assertEqual(counts['event_listener_count'], 2) 19 self.assertEqual(counts['event_listener_count'], 2)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698