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

Unified Diff: tools/telemetry/telemetry/web_perf/timeline_based_measurement_unittest.py

Issue 1013803003: [Telemetry] Remove is_smooth flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix failing test Created 5 years, 9 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/web_perf/timeline_based_measurement_unittest.py
diff --git a/tools/telemetry/telemetry/web_perf/timeline_based_measurement_unittest.py b/tools/telemetry/telemetry/web_perf/timeline_based_measurement_unittest.py
index 043bdd10881cf0a3a19aa3ab0753f795078cbdc1..663d50293a7a5c2db2ff7e020302d1512aac9690 100644
--- a/tools/telemetry/telemetry/web_perf/timeline_based_measurement_unittest.py
+++ b/tools/telemetry/telemetry/web_perf/timeline_based_measurement_unittest.py
@@ -114,11 +114,11 @@ class TimelineBasedMetricsTests(unittest.TestCase):
d = TimelineBasedMetricTestData()
# Insert 2 interaction records to renderer_thread and 1 to foo_thread
d.AddInteraction(d.renderer_thread, ts=0, duration=20,
- marker='Interaction.LogicalName1/is_smooth')
+ marker='Interaction.LogicalName1')
d.AddInteraction(d.renderer_thread, ts=25, duration=5,
- marker='Interaction.LogicalName2/')
+ marker='Interaction.LogicalName2')
d.AddInteraction(d.foo_thread, ts=50, duration=15,
- marker='Interaction.LogicalName3/is_smooth')
+ marker='Interaction.LogicalName3')
d.FinalizeImport()
self.assertEquals(2, len(d.threads_to_records_map))
@@ -127,7 +127,6 @@ class TimelineBasedMetricsTests(unittest.TestCase):
self.assertIn(d.renderer_thread, d.threads_to_records_map)
interactions = d.threads_to_records_map[d.renderer_thread]
self.assertEquals(2, len(interactions))
- self.assertTrue(interactions[0].is_smooth)
self.assertEquals(0, interactions[0].start)
self.assertEquals(20, interactions[0].end)
@@ -138,14 +137,13 @@ class TimelineBasedMetricsTests(unittest.TestCase):
self.assertIn(d.foo_thread, d.threads_to_records_map)
interactions = d.threads_to_records_map[d.foo_thread]
self.assertEquals(1, len(interactions))
- self.assertTrue(interactions[0].is_smooth)
self.assertEquals(50, interactions[0].start)
self.assertEquals(65, interactions[0].end)
def testAddResults(self):
d = TimelineBasedMetricTestData()
d.AddInteraction(d.renderer_thread, ts=0, duration=20,
- marker='Interaction.LogicalName1/is_smooth')
+ marker='Interaction.LogicalName1')
d.AddInteraction(d.foo_thread, ts=25, duration=5,
marker='Interaction.LogicalName2')
d.FinalizeImport()
@@ -158,51 +156,39 @@ class TimelineBasedMetricsTests(unittest.TestCase):
def testDuplicateInteractionsInDifferentThreads(self):
d = TimelineBasedMetricTestData()
d.AddInteraction(d.renderer_thread, ts=10, duration=5,
- marker='Interaction.LogicalName/is_smooth,repeatable')
+ marker='Interaction.LogicalName/repeatable')
d.AddInteraction(d.foo_thread, ts=20, duration=5,
- marker='Interaction.LogicalName/is_smooth')
+ marker='Interaction.LogicalName')
self.assertRaises(tbm_module.InvalidInteractions, d.FinalizeImport)
def testDuplicateRepeatableInteractionsInDifferentThreads(self):
d = TimelineBasedMetricTestData()
d.AddInteraction(d.renderer_thread, ts=10, duration=5,
- marker='Interaction.LogicalName/is_smooth,repeatable')
+ marker='Interaction.LogicalName/repeatable')
d.AddInteraction(d.foo_thread, ts=20, duration=5,
- marker='Interaction.LogicalName/is_smooth,repeatable')
+ marker='Interaction.LogicalName/repeatable')
self.assertRaises(tbm_module.InvalidInteractions, d.FinalizeImport)
def testDuplicateUnrepeatableInteractionsInSameThread(self):
d = TimelineBasedMetricTestData()
d.AddInteraction(d.renderer_thread, ts=10, duration=5,
- marker='Interaction.LogicalName/is_smooth')
+ marker='Interaction.LogicalName')
d.AddInteraction(d.renderer_thread, ts=20, duration=5,
- marker='Interaction.LogicalName/is_smooth')
+ marker='Interaction.LogicalName')
d.FinalizeImport()
self.assertRaises(tbm_module.InvalidInteractions, d.AddResults)
def testDuplicateRepeatableInteractions(self):
d = TimelineBasedMetricTestData()
d.AddInteraction(d.renderer_thread, ts=10, duration=5,
- marker='Interaction.LogicalName/is_smooth,repeatable')
+ marker='Interaction.LogicalName/repeatable')
d.AddInteraction(d.renderer_thread, ts=20, duration=5,
- marker='Interaction.LogicalName/is_smooth,repeatable')
+ marker='Interaction.LogicalName/repeatable')
d.FinalizeImport()
d.AddResults()
self.assertEquals(1, len(d.results.pages_that_succeeded))
- def testDuplicateRepeatableInteractionsWithDifferentMetrics(self):
- d = TimelineBasedMetricTestData()
-
- responsive_marker = 'Interaction.LogicalName/repeatable'
- d.AddInteraction(
- d.renderer_thread, ts=10, duration=5, marker=responsive_marker)
- smooth_marker = 'Interaction.LogicalName/is_smooth,repeatable'
- d.AddInteraction(d.renderer_thread, ts=20, duration=5, marker=smooth_marker)
- d.FinalizeImport()
- self.assertRaises(tbm_module.InvalidInteractions, d.AddResults)
-
-
class TestTimelinebasedMeasurementPage(page_module.Page):
def __init__(self, ps, base_dir, trigger_animation=False,

Powered by Google App Engine
This is Rietveld 408576698