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

Unified Diff: LayoutTests/inspector/utilities.html

Issue 199793022: DevTools: Fix a bug in Array.remove (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Turned back to a simple version. Created 6 years, 9 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
« no previous file with comments | « no previous file | LayoutTests/inspector/utilities-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « no previous file | LayoutTests/inspector/utilities-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698