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

Unified Diff: chrome/browser/resources/media_internals/disjoint_range_set_test.html

Issue 12153002: Move chrome://media-internals to content. This allows us to hide implementation details from the pu… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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
Index: chrome/browser/resources/media_internals/disjoint_range_set_test.html
===================================================================
--- chrome/browser/resources/media_internals/disjoint_range_set_test.html (revision 179909)
+++ chrome/browser/resources/media_internals/disjoint_range_set_test.html (working copy)
@@ -1,96 +0,0 @@
-<!DOCTYPE html>
-<html>
-<!--
-Copyright (c) 2011 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>
- <title></title>
- <script src="http://closure-library.googlecode.com/svn/trunk/closure/goog/base.js"></script>
- <script src="../../../../ui/webui/resources/js/cr.js"></script>
- <script src="disjoint_range_set.js"></script>
- <script>
- goog.require('goog.testing.jsunit');
- </script>
- </head>
- <body>
- <script>
-
- var range;
-
- function assertRangeEquals(ranges) {
- assertArrayEquals(
- ranges, range.map(function(start, end) { return [start, end]; }));
- };
-
- function setUp() {
- range = new media.DisjointRangeSet;
- };
-
- function testAdd() {
- range.add(1, 6);
- assertRangeEquals([[1, 6]]);
- range.add(-5, -3);
- assertRangeEquals([[-5, -3], [1, 6]]);
- };
-
- function testAddAdjacent() {
- range.add(3, 6);
- assertRangeEquals([[3, 6]]);
- range.add(1, 2);
- assertRangeEquals([[1, 6]]);
- range.add(7, 9);
- assertRangeEquals([[1, 9]]);
- };
-
- function testAddNotQuiteAdjacent() {
- range.add(3, 6);
- assertRangeEquals([[3, 6]]);
- range.add(0, 1);
- assertRangeEquals([[0, 1], [3, 6]]);
- range.add(8, 9);
- assertRangeEquals([[0, 1], [3, 6], [8, 9]]);
- };
-
- function testAddOverlapping() {
- range.add(1, 6);
- assertRangeEquals([[1, 6]]);
- range.add(5, 8);
- assertRangeEquals([[1, 8]]);
- range.add(0, 1);
- assertRangeEquals([[0, 8]]);
- };
-
- function testMax() {
- assertNull(range.max());
- range.add(1, 6);
- assertEquals(range.max(), 6);
- range.add(3, 8);
- assertEquals(range.max(), 8);
- range.remove(2, 3);
- assertEquals(range.max(), 8);
- range.remove(4, 10);
- assertEquals(range.max(), 1);
- range.remove(1, 1);
- assertNull(range.max());
- };
-
- function testRemove() {
- range.add(1, 20);
- assertRangeEquals([[1, 20]]);
- range.remove(0, 3);
- assertRangeEquals([[4, 20]]);
- range.remove(18, 20);
- assertRangeEquals([[4, 17]]);
- range.remove(5, 16);
- assertRangeEquals([[4, 4], [17, 17]]);
- };
-
- function testStartsEmpty() {
- assertRangeEquals([]);
- };
-
- </script>
- </body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698