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

Unified Diff: tools/deep_memory_profiler/visualizer/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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/deep_memory_profiler/visualizer/profiler.js ('k') | tools/deep_memory_profiler/visualizer/run.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/deep_memory_profiler/visualizer/profiler_unittest.js
diff --git a/tools/deep_memory_profiler/visualizer/profiler_unittest.js b/tools/deep_memory_profiler/visualizer/profiler_unittest.js
deleted file mode 100644
index f6f0f8c30bf350953e772909e425ebe4509ecf39..0000000000000000000000000000000000000000
--- a/tools/deep_memory_profiler/visualizer/profiler_unittest.js
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-/**
- * Test whether given model is valid.
- * @param {Object} model
- * @return {boolean} Model is valid or not.
- */
-var modelIsValid = function(model) {
- // Model object must contain 'name' and 'id'.
- if (!('name' in model) || !('id' in model))
- return false;
-
- // Model object cant contain 'children' and 'size' together.
- if ('children' in model && 'size' in model ||
- !('children' in model) && !('size' in model))
- return false;
-
- // Model object must contain 'subs' and 'template' both or neither.
- if ('subs' in model && !('template' in model) ||
- !('subs' in model) && 'template' in model)
- return false;
-
- // If model contains children, every child also must be valid.
- if ('children' in model) {
- return model.children.reduce(function(previous, current) {
- return previous && modelIsValid(current);
- }, true);
- }
-
- return true;
-};
-
-// Test title format is file-name:function-name.
-test('profiler:parseTemplate_', function() {
- stop();
- $.getJSON('data/sample.json', function(data) {
- start();
- var profiler = new Profiler(data);
- var models = profiler.parseTemplate_();
- equal(models.length, data.snapshots.length);
- models.forEach(function(model) {
- ok(modelIsValid(model));
- });
- inspect(models, 'models generated by profile:\n');
- });
-});
« no previous file with comments | « tools/deep_memory_profiler/visualizer/profiler.js ('k') | tools/deep_memory_profiler/visualizer/run.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698