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

Unified Diff: tracing/tracing/extras/importer/battor_importer_test.html

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge Created 4 years, 5 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: tracing/tracing/extras/importer/battor_importer_test.html
diff --git a/tracing/tracing/extras/importer/battor_importer_test.html b/tracing/tracing/extras/importer/battor_importer_test.html
index ac8c125dbc64c6c4560e3c0f67d1b28d32ac3fd3..a5e347caede140d7707ae3cb467f4ea8c6c6c6e6 100644
--- a/tracing/tracing/extras/importer/battor_importer_test.html
+++ b/tracing/tracing/extras/importer/battor_importer_test.html
@@ -63,6 +63,24 @@ tr.b.unittest.testSuite(function() {
assert.strictEqual(m.device.powerSeries.samples[5].start, 10.0);
});
+ test('importExplicitClockSync_syncOnNegativeVoltageLine', function() {
+ // Add a BattOr sample with an explicit clock sync that occurs on a line
+ // with a negative voltage measurement. The sample should be ignored, but
+ // the clock sync should be counted.
+ var battorLinesWithExplicitSync = BATTOR_LINES.slice();
+ battorLinesWithExplicitSync.push(
+ '2.500000 -1.000000 4000.000000 <ABCDEF-01234-5678-0A1B2C3D>');
+
+ var m = tr.c.TestUtils.newModelWithEvents(
+ [CHROMIUM_EVENTS, battorLinesWithExplicitSync.join('\n')]);
+
+ // Check to see if power samples were imported successfully.
+ assert.isDefined(m.device.powerSeries);
+
+ assert.lengthOf(m.device.powerSeries.samples, 5);
+ assert.strictEqual(m.device.powerSeries.samples[0].start, 7.5);
+ });
+
test('explicitClockSyncWithoutSyncMarkers', function() {
// Create an empty model.
var m = new tr.Model();
@@ -78,6 +96,7 @@ tr.b.unittest.testSuite(function() {
var m = tr.c.TestUtils.newModelWithEvents(
[battorLinesWithExplicitSync.join('\n')]);
+ assert.lengthOf(m.device.powerSeries.samples, 6);
assert.strictEqual(m.device.powerSeries.samples[0].start, 0);
assert.strictEqual(m.device.powerSeries.samples[5].start, 2.5);
});
« no previous file with comments | « tracing/tracing/extras/importer/battor_importer.html ('k') | tracing/tracing/extras/importer/linux_perf/ftrace_importer.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698