Changeset 50809 in webkit


Ignore:
Timestamp:
Nov 11, 2009 9:05:30 AM (14 years ago)
Author:
eric@webkit.org
Message:

2009-11-11 Eric Z. Ayers <zundel@google.com>

Reviewed by Timothy Hatcher.

Adds a test that dumps the timeline data for a simple script tag.

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

  • inspector/inspector-test.js: (onload):
  • inspector/timeline-script-tag-1-expected.txt: Added.
  • inspector/timeline-script-tag-1.html: Added.
  • inspector/timeline-test.js: Added. (retrieveTimelineData): (): (dumpTimelineRecords): (printTimelineRecordProperties): (isNonDeterministicProp): (printProps): (isTimelineOverheadRecord): (markTimelineRecordAsOverhead): (timelineAgentTypeToString): (frontend_startTimelineProfiler.window.WebInspector.addRecordToTimeline): (frontend_startTimelineProfiler): (frontend_getTimelineResults): (frontend_setup):
Location:
trunk/LayoutTests
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r50800 r50809  
     12009-11-11  Eric Z. Ayers  <zundel@google.com>
     2
     3        Reviewed by Timothy Hatcher.
     4
     5        Adds a test that dumps the timeline data for a simple script tag.
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=31204
     8
     9        * inspector/inspector-test.js:
     10        (onload):
     11        * inspector/timeline-script-tag-1-expected.txt: Added.
     12        * inspector/timeline-script-tag-1.html: Added.
     13        * inspector/timeline-test.js: Added.
     14        (retrieveTimelineData):
     15        ():
     16        (dumpTimelineRecords):
     17        (printTimelineRecordProperties):
     18        (isNonDeterministicProp):
     19        (printProps):
     20        (isTimelineOverheadRecord):
     21        (markTimelineRecordAsOverhead):
     22        (timelineAgentTypeToString):
     23        (frontend_startTimelineProfiler.window.WebInspector.addRecordToTimeline):
     24        (frontend_startTimelineProfiler):
     25        (frontend_getTimelineResults):
     26        (frontend_setup):
     27
    1282009-11-11  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
    229
  • trunk/LayoutTests/inspector/inspector-test.js

    r50582 r50809  
    1111var ignoreLoad = window.location.href.indexOf("?reload") === -1;
    1212if (ignoreLoad) {
     13    // Start in a timer, as synchronous opening of web inspector may fail on Windows
    1314    setTimeout(function() {
    1415        if (window.layoutTestController)
    1516            layoutTestController.showWebInspector();
    16         window.location.href += "?reload";
    1717    }, 0);
    1818}
     
    2020function onload()
    2121{
    22     if (ignoreLoad)
     22    if (ignoreLoad) {
     23        // Inject scripts into the frontend on the first pass.  Some other logic may want to
     24        // use them before the reload.
     25        var toInject = [];
     26        for (var name in window) {
     27            if (name.indexOf("frontend_") === 0 && typeof window[name] === "function")
     28                toInject.push(window[name].toString());
     29        }
     30        // Invoke a setup method if it has been specified
     31        if (window["frontend_setup"])
     32            toInject.push("frontend_setup();");
     33
     34        evaluateInWebInspector(toInject.join("\n"), function(arg) {
     35            window.location.href += "?reload";
     36        });
    2337        return;
     38    }
    2439
    2540    var outputElement = document.createElement("div");
     
    2742    document.body.appendChild(outputElement);
    2843
    29     var toInject = [];
    30     for (var name in window) {
    31         if (name.indexOf("frontend_") === 0 && typeof window[name] === "function")
    32             toInject.push(window[name].toString());
    33     }
    34     evaluateInWebInspector(toInject.join("\n"), doit);
     44    // Make sure web inspector has settled down before executing user code
     45    evaluateInWebInspector("true", doit);
    3546
    3647    // Make sure web inspector window is closed before the test is interrupted.
Note: See TracChangeset for help on using the changeset viewer.