Index: LayoutTests/inspector/utilities.html |
diff --git a/LayoutTests/inspector/utilities.html b/LayoutTests/inspector/utilities.html |
index 7149edf41834f5c0f1b06b4d74fda2fb9311102f..8ca42f4ffa3575ef93cbe080b4dedd7bd5230b40 100644 |
--- a/LayoutTests/inspector/utilities.html |
+++ b/LayoutTests/inspector/utilities.html |
@@ -6,6 +6,28 @@ |
function test() |
{ |
InspectorTest.runTestSuite([ |
+ function remove(next) |
+ { |
+ var testArrays = [ |
+ [], [], [], |
+ [1], [1], [1], |
+ [1, 2, 3, 4, 5, 4, 3, 2, 1], [1, 3, 4, 5, 4, 3, 2, 1], [1, 3, 4, 5, 4, 3, 1], |
+ [2, 2, 2, 2, 2], [2, 2, 2, 2], [], |
+ [2, 2, 2, 1, 2, 2, 3, 2], [2, 2, 1, 2, 2, 3, 2], [1, 3] |
+ ]; |
+ for (var i = 0; i < testArrays.length; i += 3) { |
+ var actual = testArrays[i].slice(0); |
+ var expected = testArrays[i + 1]; |
+ actual.remove(2, true); |
+ InspectorTest.assertEquals(JSON.stringify(expected), JSON.stringify(actual), "remove(2, true) passed"); |
+ actual = testArrays[i].slice(0); |
+ expected = testArrays[i + 2]; |
+ actual.remove(2, false); |
+ InspectorTest.assertEquals(JSON.stringify(expected), JSON.stringify(actual), "remove(2, false) passed"); |
+ } |
+ next(); |
+ }, |
+ |
function orderedMergeIntersect(next) |
{ |
function comparator(a, b) |