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

Side by Side Diff: tracing/tracing/model/model_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 unified diff | Download patch
« no previous file with comments | « tracing/tracing/model/model.html ('k') | tracing/tracing/model/object_collection.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2013 The Chromium Authors. All rights reserved. 3 Copyright (c) 2013 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="import" href="/tracing/core/test_utils.html"> 8 <link rel="import" href="/tracing/core/test_utils.html">
9 <link rel="import" href="/tracing/extras/importer/trace_event_importer.html"> 9 <link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
10 <link rel="import" href="/tracing/importer/import.html"> 10 <link rel="import" href="/tracing/importer/import.html">
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 var t = m.getOrCreateProcess(1).getOrCreateThread(1); 225 var t = m.getOrCreateProcess(1).getOrCreateThread(1);
226 t.sliceGroup.pushSlice(new ThreadSlice('categoryA', 'a', 0, 1, {}, 3)); 226 t.sliceGroup.pushSlice(new ThreadSlice('categoryA', 'a', 0, 1, {}, 3));
227 t.sliceGroup.pushSlice(new ThreadSlice('categoryA', 'a', 0, 1, {}, 3)); 227 t.sliceGroup.pushSlice(new ThreadSlice('categoryA', 'a', 0, 1, {}, 3));
228 t.sliceGroup.pushSlice(new ThreadSlice('categoryB', 'a', 0, 1, {}, 3)); 228 t.sliceGroup.pushSlice(new ThreadSlice('categoryB', 'a', 0, 1, {}, 3));
229 t.sliceGroup.pushSlice(new ThreadSlice('categoryA', 'a', 0, 1, {}, 3)); 229 t.sliceGroup.pushSlice(new ThreadSlice('categoryA', 'a', 0, 1, {}, 3));
230 t.sliceGroup.pushSlice(new ThreadSlice('', 'a', 0, 1, {}, 3)); 230 t.sliceGroup.pushSlice(new ThreadSlice('', 'a', 0, 1, {}, 3));
231 m.updateCategories_(); 231 m.updateCategories_();
232 assert.deepEqual(['categoryA', 'categoryB'], m.categories); 232 assert.deepEqual(['categoryA', 'categoryB'], m.categories);
233 }); 233 });
234 234
235 test('model_iterateAllEvents', function() {
236 var m = createModelWithOneOfEverything();
237 var wasCalled = false;
238 m.iterateAllEvents(function(event) {
239 assert.isTrue(event instanceof tr.model.Event);
240 wasCalled = true;
241 });
242 assert.isTrue(wasCalled);
243 });
244
245 test('getEventByStableId', function() { 235 test('getEventByStableId', function() {
246 var m = new tr.Model(); 236 var m = new tr.Model();
247 var p = m.getOrCreateProcess(0); 237 var p = m.getOrCreateProcess(0);
248 var t = p.getOrCreateThread(1); 238 var t = p.getOrCreateThread(1);
249 var slice = tr.c.TestUtils.newSliceEx({start: 0, duration: 10}); 239 var slice = tr.c.TestUtils.newSliceEx({start: 0, duration: 10});
250 t.sliceGroup.pushSlice(slice); 240 t.sliceGroup.pushSlice(slice);
251 var ue = tr.c.TestUtils.newInteractionRecord(m, 0, 10); 241 var ue = tr.c.TestUtils.newInteractionRecord(m, 0, 10);
252 m.userModel.expectations.push(ue); 242 m.userModel.expectations.push(ue);
253 var gie = tr.c.TestUtils.newInstantEvent({ 243 var gie = tr.c.TestUtils.newInstantEvent({
254 title: 'gie', 244 title: 'gie',
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 scope: typeName, 332 scope: typeName,
343 id_ref: '0x1' 333 id_ref: '0x1'
344 } 334 }
345 }); 335 });
346 m.joinRefs(); 336 m.joinRefs();
347 assert.equal(s1.refCount, 1); 337 assert.equal(s1.refCount, 1);
348 assert.equal(s2.refCount, 0); 338 assert.equal(s2.refCount, 0);
349 }); 339 });
350 }); 340 });
351 </script> 341 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/model/model.html ('k') | tracing/tracing/model/object_collection.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698