Bug 56835

Summary: Web Inspector: Add tests for HeapSnapshot module
Product: WebKit Reporter: Mikhail Naganov <mnaganov>
Component: Web Inspector (Deprecated)Assignee: Mikhail Naganov <mnaganov>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch
mnaganov: commit-queue-
reuse more capabilities of test infrastructure pfeldman: review+, mnaganov: commit-queue-

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.