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

Unified Diff: tools/telemetry/telemetry/core/chrome/inspector_timeline_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 side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/telemetry/core/chrome/inspector_timeline_unittest.py
diff --git a/tools/telemetry/telemetry/inspector_timeline_unittest.py b/tools/telemetry/telemetry/core/chrome/inspector_timeline_unittest.py
similarity index 84%
rename from tools/telemetry/telemetry/inspector_timeline_unittest.py
rename to tools/telemetry/telemetry/core/chrome/inspector_timeline_unittest.py
index e93a4cadc2a42809cc47ff3e98f536fe3fb9f020..30ad229ed0167aa37c3d6e25fa7a5f1521988f0b 100644
--- a/tools/telemetry/telemetry/inspector_timeline_unittest.py
+++ b/tools/telemetry/telemetry/core/chrome/inspector_timeline_unittest.py
@@ -4,9 +4,9 @@
import os
import unittest
-from telemetry import tab_test_case
-from telemetry import util
-from telemetry.inspector_timeline import InspectorTimeline
+from telemetry.core import util
+from telemetry.core.chrome import inspector_timeline
+from telemetry.test import tab_test_case
_SAMPLE_MESSAGE = {
'children': [
@@ -49,7 +49,8 @@ _SAMPLE_MESSAGE = {
class InspectorEventParsingTest(unittest.TestCase):
def testParsingWithSampleData(self):
- root_event = InspectorTimeline.RawEventToTimelineEvent(_SAMPLE_MESSAGE)
+ root_event = inspector_timeline.InspectorTimeline.RawEventToTimelineEvent(
+ _SAMPLE_MESSAGE)
self.assertTrue(root_event)
decode_image_event = [
child for child in root_event.GetAllChildrenRecursive()
@@ -62,7 +63,8 @@ class InspectorEventParsingTest(unittest.TestCase):
'startTime': 1,
'endTime': 3,
'children': []}
- event = InspectorTimeline.RawEventToTimelineEvent(raw_event)
+ event = inspector_timeline.InspectorTimeline.RawEventToTimelineEvent(
+ raw_event)
self.assertEquals('Foo', event.name)
self.assertEquals(1, event.start_time_ms)
self.assertEquals(3, event.end_time_ms)
@@ -75,7 +77,8 @@ class InspectorEventParsingTest(unittest.TestCase):
'endTime': 3,
'foo': 7,
'bar': {'x': 1}}
- event = InspectorTimeline.RawEventToTimelineEvent(raw_event)
+ event = inspector_timeline.InspectorTimeline.RawEventToTimelineEvent(
+ raw_event)
self.assertEquals('Foo', event.name)
self.assertEquals(1, event.start_time_ms)
self.assertEquals(3, event.end_time_ms)
@@ -88,21 +91,23 @@ class InspectorEventParsingTest(unittest.TestCase):
raw_event = {'type': 'Foo',
'endTime': 1,
'children': []}
- event = InspectorTimeline.RawEventToTimelineEvent(raw_event)
+ event = inspector_timeline.InspectorTimeline.RawEventToTimelineEvent(
+ raw_event)
self.assertEquals(None, event)
def testEventsWithNoEndTimeAreDropped(self):
raw_event = {'type': 'Foo',
'endTime': 1,
'children': []}
- event = InspectorTimeline.RawEventToTimelineEvent(raw_event)
+ event = inspector_timeline.InspectorTimeline.RawEventToTimelineEvent(
+ raw_event)
self.assertEquals(None, event)
class InspectorTimelineTabTest(tab_test_case.TabTestCase):
def _StartServer(self):
base_dir = os.path.dirname(__file__)
- self._browser.SetHTTPServerDirectory(os.path.join(base_dir, '..',
+ self._browser.SetHTTPServerDirectory(os.path.join(base_dir, '..', '..',
'unittest_data'))
def _WaitForAnimationFrame(self):
@@ -112,7 +117,7 @@ class InspectorTimelineTabTest(tab_test_case.TabTestCase):
util.WaitFor(_IsDone, 5)
def testGotTimeline(self):
- with InspectorTimeline.Recorder(self._tab):
+ with inspector_timeline.InspectorTimeline.Recorder(self._tab):
self._tab.ExecuteJavaScript(
"""
var done = false;
« no previous file with comments | « tools/telemetry/telemetry/core/chrome/inspector_timeline.py ('k') | tools/telemetry/telemetry/core/chrome/platform.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698