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

Side by Side Diff: tools/deep_memory_profiler/visualizer/static/profiler_unittest.js

Issue 23777005: Modified directory preparing for app engine for dmprof visualizer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove index.js Created 7 years, 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * Test whether given model is valid. 6 * Test whether given model is valid.
7 * @param {Object} model 7 * @param {Object} model
8 * @return {boolean} Model is valid or not. 8 * @return {boolean} Model is valid or not.
9 */ 9 */
10 var modelIsValid = function(model) { 10 var modelIsValid = function(model) {
(...skipping 17 matching lines...) Expand all
28 return previous && modelIsValid(current); 28 return previous && modelIsValid(current);
29 }, true); 29 }, true);
30 } 30 }
31 31
32 return true; 32 return true;
33 }; 33 };
34 34
35 // Test title format is file-name:function-name. 35 // Test title format is file-name:function-name.
36 test('profiler:parseTemplate_', function() { 36 test('profiler:parseTemplate_', function() {
37 stop(); 37 stop();
38 $.getJSON('data/sample.json', function(data) { 38 $.getJSON('../data/sample.json', function(data) {
39 start(); 39 start();
40 var profiler = new Profiler(data); 40 var profiler = new Profiler(data);
41 var models = profiler.parseTemplate_(); 41 var models = profiler.parseTemplate_();
42 equal(models.length, data.snapshots.length); 42 equal(models.length, data.snapshots.length);
43 models.forEach(function(model) { 43 models.forEach(function(model) {
44 ok(modelIsValid(model)); 44 ok(modelIsValid(model));
45 }); 45 });
46 inspect(models, 'models generated by profile:\n'); 46 inspect(models, 'models generated by profile:\n');
47 }); 47 });
48 }); 48 });
OLDNEW
« no previous file with comments | « tools/deep_memory_profiler/visualizer/static/profiler.js ('k') | tools/deep_memory_profiler/visualizer/static/test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698