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; |