Index: tools/cc-frame-viewer/src/model_test.html |
diff --git a/tools/cc-frame-viewer/src/model_test.html b/tools/cc-frame-viewer/src/model_test.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f3cffca63054d3581e8b23573fad49d6de422d9e |
--- /dev/null |
+++ b/tools/cc-frame-viewer/src/model_test.html |
@@ -0,0 +1,33 @@ |
+<!DOCTYPE HTML> |
+<html> |
+<!-- |
+Copyright (c) 2012 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. |
+--> |
+<head> |
+<script src="base.js"></script> |
+<script> |
+ base.require('base.unittest'); |
+ base.require('model'); |
+</script> |
+</head> |
+<body> |
+<script src="../unittest_data/full_trace_but_with_only_one_frame.js"></script> |
+<script> |
+ 'use strict'; |
+ |
+ var Model = ccfv.Model; |
+ var Frame = ccfv.model.Frame; |
+ |
+ function testData1() { |
+ var model = new Model(); |
+ model.initFromTraceEvents(gFullTraceButWithOnlyOneFrame); |
+ assertEquals(1, base.dictionaryValues(model.lthiHistories).length) |
+ var lthiHistory = base.dictionaryValues(model.lthiHistories)[0]; |
+ assertEquals(1, lthiHistory.lthiSnapshots.length); |
+ } |
+ |
+</script> |
+</body> |
+</html> |