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

Side by Side Diff: chrome/browser/resources/media_internals/disjoint_range_set_test.html

Issue 7479005: Add charts to the resource data section of chrome://media-internals. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: camelCase. Created 9 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <!-- 3 <!--
4 Copyright (c) 2011 The Chromium Authors. All rights reserved. 4 Copyright (c) 2011 The Chromium Authors. All rights reserved.
5 Use of this source code is governed by a BSD-style license that can be 5 Use of this source code is governed by a BSD-style license that can be
6 found in the LICENSE file. 6 found in the LICENSE file.
7 --> 7 -->
8 <head> 8 <head>
9 <title></title> 9 <title></title>
10 <script src="http://closure-library.googlecode.com/svn/trunk/closure/goog/ba se.js"></script> 10 <script src="http://closure-library.googlecode.com/svn/trunk/closure/goog/ba se.js"></script>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 function testAddOverlapping() { 56 function testAddOverlapping() {
57 range.add(1, 6); 57 range.add(1, 6);
58 assertRangeEquals([[1, 6]]); 58 assertRangeEquals([[1, 6]]);
59 range.add(5, 8); 59 range.add(5, 8);
60 assertRangeEquals([[1, 8]]); 60 assertRangeEquals([[1, 8]]);
61 range.add(0, 1); 61 range.add(0, 1);
62 assertRangeEquals([[0, 8]]); 62 assertRangeEquals([[0, 8]]);
63 }; 63 };
64 64
65 function testMax() {
66 assertNull(range.max());
67 range.add(1, 6);
68 assertEquals(range.max(), 6);
69 range.add(3, 8);
70 assertEquals(range.max(), 8);
71 range.remove(2, 3);
72 assertEquals(range.max(), 8);
73 range.remove(4, 10);
74 assertEquals(range.max(), 1);
75 range.remove(1, 1);
76 assertNull(range.max());
77 };
78
65 function testRemove() { 79 function testRemove() {
66 range.add(1, 20); 80 range.add(1, 20);
67 assertRangeEquals([[1, 20]]); 81 assertRangeEquals([[1, 20]]);
68 range.remove(0, 3); 82 range.remove(0, 3);
69 assertRangeEquals([[4, 20]]); 83 assertRangeEquals([[4, 20]]);
70 range.remove(18, 20); 84 range.remove(18, 20);
71 assertRangeEquals([[4, 17]]); 85 assertRangeEquals([[4, 17]]);
72 range.remove(5, 16); 86 range.remove(5, 16);
73 assertRangeEquals([[4, 4], [17, 17]]); 87 assertRangeEquals([[4, 4], [17, 17]]);
74 }; 88 };
75 89
76 function testStartsEmpty() { 90 function testStartsEmpty() {
77 assertRangeEquals([]); 91 assertRangeEquals([]);
78 }; 92 };
79 93
80 </script> 94 </script>
81 </body> 95 </body>
82 </html> 96 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698