Bug 56835 - Web Inspector: Add tests for HeapSnapshot module
Summary: Web Inspector: Add tests for HeapSnapshot module
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Mikhail Naganov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-22 08:15 PDT by Mikhail Naganov
Modified: 2011-03-25 00:30 PDT (History)
10 users (show)

See Also:


Attachments
patch (18.71 KB, patch)
2011-03-22 08:21 PDT, Mikhail Naganov
mnaganov: commit-queue-
Details | Formatted Diff | Diff
reuse more capabilities of test infrastructure (15.27 KB, patch)
2011-03-24 06:01 PDT, Mikhail Naganov
pfeldman: review+
mnaganov: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Naganov 2011-03-22 08:15:52 PDT
The logic is non-trivial, and tests are required.
Comment 1 Mikhail Naganov 2011-03-22 08:21:34 PDT
Created attachment 86463 [details]
patch
Comment 2 Mikhail Naganov 2011-03-24 06:01:35 PDT
Created attachment 86761 [details]
reuse more capabilities of test infrastructure
Comment 3 Pavel Feldman 2011-03-24 11:12:55 PDT
Comment on attachment 86761 [details]
reuse more capabilities of test infrastructure

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

> LayoutTests/http/tests/inspector/heap-snapshot-test.js:1
> +var initialize_HeapSnapshotTest = function() {

You should place your utility test into inspector/profiler since you don't have tests that require network interaction / serving off http

> LayoutTests/inspector/profiler/heap-snapshot-expected.txt:4
> +Running: heapSnapshotNodeSimpleTest

It would be nice if your tests were printing something to make sure something is happening.
Comment 4 Mikhail Naganov 2011-03-25 00:25:10 PDT
(In reply to comment #3)
> (From update of attachment 86761 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=86761&action=review
> 
> > LayoutTests/http/tests/inspector/heap-snapshot-test.js:1
> > +var initialize_HeapSnapshotTest = function() {
> 
> You should place your utility test into inspector/profiler since you don't have tests that require network interaction / serving off http

Moved.

> 
> > LayoutTests/inspector/profiler/heap-snapshot-expected.txt:4
> > +Running: heapSnapshotNodeSimpleTest
> 
> It would be nice if your tests were printing something to make sure something is happening.

They will scream if something is wrong. I think it's enough that the framework prints the name of the test currently running.
Comment 5 Mikhail Naganov 2011-03-25 00:30:02 PDT
Manually committed http://trac.webkit.org/changeset/81946


2011-03-24  Mikhail Naganov  <mnaganov@chromium.org>

        Reviewed by Pavel Feldman.

        Web Inspector: Add tests for HeapSnapshot module.
        https://bugs.webkit.org/show_bug.cgi?id=56835

        * http/tests/inspector/heap-snapshot-test.js: Added.
        (initialize_HeapSnapshotTest.InspectorTest.createHeapSnapshotMockObject):
        (initialize_HeapSnapshotTest.InspectorTest.createHeapSnapshotMock):
        (initialize_HeapSnapshotTest):
        * inspector/profiler/heap-snapshot-expected.txt: Added.
        * inspector/profiler/heap-snapshot.html: Added.