Bug 162044 - Web Inspector: Add test coverage for all array utility functions
Summary: Web Inspector: Add test coverage for all array utility functions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Matt Baker
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-09-15 17:55 PDT by Matt Baker
Modified: 2016-09-18 12:51 PDT (History)
7 users (show)

See Also:


Attachments
[Patch] Proposed Fix (7.32 KB, patch)
2016-09-15 17:58 PDT, Matt Baker
no flags Details | Formatted Diff | Diff
[Patch] For Landing (9.20 KB, patch)
2016-09-16 15:49 PDT, Matt Baker
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-cq-01 for mac-yosemite (862.07 KB, application/zip)
2016-09-16 16:43 PDT, WebKit Commit Bot
no flags Details
Patch (9.26 KB, patch)
2016-09-18 12:19 PDT, Matt Baker
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Baker 2016-09-15 17:55:26 PDT
Summary;
Add test coverage for all array utility functions. The following lack tests:

Array.prototype.lastValue
Array.prototype.remove
Array.prototype.toggleIncludes
Array.prototype.insertAtIndex
Array.prototype.keySet
Comment 1 Radar WebKit Bug Importer 2016-09-15 17:55:59 PDT
<rdar://problem/28330846>
Comment 2 Matt Baker 2016-09-15 17:58:28 PDT
Created attachment 289024 [details]
[Patch] Proposed Fix
Comment 3 Joseph Pecoraro 2016-09-16 14:12:26 PDT
Comment on attachment 289024 [details]
[Patch] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=289024&action=review

r=me!

> LayoutTests/inspector/unit-tests/array-utilities.html:129
> +        test: () => {

Style: We've been simplifying the syntax here to method syntax.

    test() {

> LayoutTests/inspector/unit-tests/array-utilities.html:179
> +            let arr2 = [1, 2, 3];
> +            arr2.insertAtIndex("x", 0);
> +            InspectorTest.expectShallowEqual(arr2, ["x", 1, 2, 3], "insertAtIndex with index zero should insert at the beginning.");

I'd like a test that inserts in the middle (any index such that 0 < index < length): insertAtIndex("x", 2)
Comment 4 Matt Baker 2016-09-16 15:49:15 PDT
Created attachment 289123 [details]
[Patch] For Landing
Comment 5 WebKit Commit Bot 2016-09-16 16:43:17 PDT
Comment on attachment 289123 [details]
[Patch] For Landing

Rejecting attachment 289123 [details] from commit-queue.

New failing tests:
inspector/unit-tests/array-utilities.html
Full output: http://webkit-queues.webkit.org/results/2090758
Comment 6 WebKit Commit Bot 2016-09-16 16:43:20 PDT
Created attachment 289136 [details]
Archive of layout-test-results from webkit-cq-01 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the commit-queue.
Bot: webkit-cq-01  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 7 Matt Baker 2016-09-18 12:19:06 PDT
Created attachment 289209 [details]
Patch
Comment 8 WebKit Commit Bot 2016-09-18 12:51:39 PDT
Comment on attachment 289209 [details]
Patch

Clearing flags on attachment: 289209

Committed r206085: <http://trac.webkit.org/changeset/206085>
Comment 9 WebKit Commit Bot 2016-09-18 12:51:43 PDT
All reviewed patches have been landed.  Closing bug.