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

Side by Side Diff: tools/cc-frame-viewer/src/base/range_test.html

Issue 15736032: Remove old cc-frame-viewer now that it is upstreamed into trace_viewer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/cc-frame-viewer/src/base/range.js ('k') | tools/cc-frame-viewer/src/base/rect2.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 Copyright (c) 2012 The Chromium Authors. All rights reserved.
5 Use of this source code is governed by a BSD-style license that can be
6 found in the LICENSE file.
7 -->
8 <head>
9 <script src="../base.js"></script>
10 <script>
11 base.require('base.unittest');
12 base.require('base.range');
13 </script>
14 </head>
15 <body>
16 <script>
17 'use strict';
18
19 var Range = base.Range;
20
21 function testAddValue() {
22 var range = new Range();
23 assertTrue(range.isEmpty);
24 range.addValue(1);
25 assertFalse(range.isEmpty);
26 assertEquals(range.min, 1);
27 assertEquals(range.max, 1);
28
29 range.addValue(2);
30 assertFalse(range.isEmpty);
31 assertEquals(range.min, 1);
32 assertEquals(range.max, 2);
33 }
34
35 function testAddNonEmptyRange1() {
36 var r1 = new Range();
37 r1.addValue(1);
38 r1.addValue(2);
39
40 var r = new Range();
41 r.addRange(r1);
42 assertEquals(r.min, 1);
43 assertEquals(r.max, 2);
44 }
45
46 function testAddEmptyRange() {
47 var r1 = new Range();
48
49 var r = new Range();
50 r.addRange(r1);
51 assertTrue(r.isEmpty);
52 assertEquals(r.min, undefined);
53 assertEquals(r.max, undefined);
54 }
55
56 function testAddEmptyRange() {
57 var r1 = new Range();
58 r1.addValue(1);
59 r1.addValue(2);
60
61 var r = new Range();
62 r.addValue(3);
63 r.addRange(r1);
64 assertFalse(r.isEmpty);
65 assertEquals(r.min, 1);
66 assertEquals(r.max, 3);
67 }
68
69 </script>
70 </body>
71 </html>
OLDNEW
« no previous file with comments | « tools/cc-frame-viewer/src/base/range.js ('k') | tools/cc-frame-viewer/src/base/rect2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698