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

Unified Diff: tracing/tracing/model/model_test.html

Issue 2046553003: Add RelatedEventSet Diagnostic (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: comments, rebase Created 4 years, 6 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
« no previous file with comments | « tracing/tracing/model/model.html ('k') | tracing/tracing/value/diagnostics/diagnostic_map.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/model/model_test.html
diff --git a/tracing/tracing/model/model_test.html b/tracing/tracing/model/model_test.html
index ff12f50e0ffe1e96d9aae90d7658ba29f9d542f8..9f9f376e55f33f810a4e2ef52a4ecda74013597a 100644
--- a/tracing/tracing/model/model_test.html
+++ b/tracing/tracing/model/model_test.html
@@ -242,6 +242,26 @@ tr.b.unittest.testSuite(function() {
assert.isTrue(wasCalled);
});
+ test('getEventByStableId', function() {
+ var m = new tr.Model();
+ var p = m.getOrCreateProcess(0);
+ var t = p.getOrCreateThread(1);
+ var slice = tr.c.TestUtils.newSliceEx({start: 0, duration: 10});
+ t.sliceGroup.pushSlice(slice);
+ var ue = tr.c.TestUtils.newInteractionRecord(m, 0, 10);
+ m.userModel.expectations.push(ue);
+ var gie = tr.c.TestUtils.newInstantEvent({
+ title: 'gie',
+ start: 0,
+ colorId: 0
+ });
+ m.instantEvents.push(gie);
+
+ assert.strictEqual(slice, m.getEventByStableId(slice.stableId));
+ assert.strictEqual(ue, m.getEventByStableId(ue.stableId));
+ assert.strictEqual(gie, m.getEventByStableId(gie.stableId));
+ });
+
test('model_annotationAddRemove', function() {
var m = new tr.Model();
var a1 = new tr.model.Annotation();
« no previous file with comments | « tracing/tracing/model/model.html ('k') | tracing/tracing/value/diagnostics/diagnostic_map.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698