Bug 52634 - Web Inspector: Add layout test for the CPU profiler
Summary: Web Inspector: Add layout test for the CPU profiler
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-01-18 09:51 PST by Mikhail Naganov
Modified: 2011-01-21 08:05 PST (History)
10 users (show)

See Also:


Attachments
patch (3.09 KB, patch)
2011-01-18 09:54 PST, Mikhail Naganov
yurys: 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-01-18 09:51:36 PST
This test replaces DevToolsSanityTest.TestProfilerTab from Chromium's interactive_ui_tests.
Comment 1 Mikhail Naganov 2011-01-18 09:54:12 PST
Created attachment 79288 [details]
patch
Comment 2 Yury Semikhatsky 2011-01-19 01:09:47 PST
Comment on attachment 79288 [details]
patch

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

> LayoutTests/inspector/cpu-profiler-profiling.html:29
> +            var tree = this.profileDataGridTree;

You could dump textContent of the tree instead of traversing it.

> LayoutTests/inspector/cpu-profiler-profiling.html:62
> +Tests that CPU profiling works.

Layout tests usually include link to the bug.
Comment 3 Mikhail Naganov 2011-01-19 03:12:13 PST
Comment on attachment 79288 [details]
patch

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

>> LayoutTests/inspector/cpu-profiler-profiling.html:29
>> +            var tree = this.profileDataGridTree;
> 
> You could dump textContent of the tree instead of traversing it.

This will also look complex because profileDataGridTree doesn't have a link to HTML element, so I will need to descend to children anyway.
Also, directly matching textContent will not work, because it will contain timings -- substring search will be needed.

>> LayoutTests/inspector/cpu-profiler-profiling.html:62
>> +Tests that CPU profiling works.
> 
> Layout tests usually include link to the bug.

OK, will add.
Comment 4 Mikhail Naganov 2011-01-19 05:07:35 PST
Committed as http://trac.webkit.org/changeset/76114


2011-01-18  Mikhail Naganov  <mnaganov@chromium.org>

        Reviewed by Yury Semikhatsky.

        Web Inspector: Add layout test for the CPU profiler.

        This test replaces DevToolsSanityTest.TestProfilerTab from
        Chromium's interactive_ui_tests.

        https://bugs.webkit.org/show_bug.cgi?id=52634

        * inspector/cpu-profiler-profiling-expected.txt: Added.
        * inspector/cpu-profiler-profiling.html: Added.
Comment 5 Mikhail Naganov 2011-01-21 08:05:24 PST
Relanded as http://trac.webkit.org/changeset/76346

This time the test passes in Chromium.