Bug 52634

Summary: Web Inspector: Add layout test for the CPU profiler
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 yurys: review+, mnaganov: commit-queue?

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.