Changeset 50830 in webkit


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

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

Reviewed by Pavel Feldman.

Added a test of an externally loaded script tag for Inspector
timeline records.
Fixed identity comparisons.

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

  • inspector/timeline-script-tag-1.html:
  • inspector/timeline-script-tag-2-expected.txt: Added.
  • inspector/timeline-script-tag-2.html: Added.
  • inspector/timeline-script-tag-2.js: Added.
  • inspector/timeline-test.js: (): (timelineAgentTypeToString):
Location:
trunk/LayoutTests
Files:
2 added
3 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r50827 r50830  
     12009-11-11  Eric Z. Ayers  <zundel@google.com>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Added a test of an externally loaded script tag for Inspector
     6        timeline records.
     7        Fixed identity comparisons.
     8
     9        https://bugs.webkit.org/show_bug.cgi?id=31365
     10
     11        * inspector/timeline-script-tag-1.html:
     12        * inspector/timeline-script-tag-2-expected.txt: Added.
     13        * inspector/timeline-script-tag-2.html: Added.
     14        * inspector/timeline-script-tag-2.js: Added.
     15        * inspector/timeline-test.js:
     16        ():
     17        (timelineAgentTypeToString):
     18
    1192009-11-11  Antonio Gomes  <tonikitoo@webkit.org>
    220
  • trunk/LayoutTests/inspector/timeline-script-tag-1.html

    r50809 r50830  
    1111    for (var i = 0; i < numChildren; ++i) {
    1212        var child = record.children[i];
    13         if (child.type == timelineAgentRecordType.MarkTimeline
    14             && child.data.message == timelineMark
     13        if (child.type === timelineAgentRecordType.MarkTimeline
     14            && child.data.message === timelineMark
    1515            && record.data.url.indexOf("timeline-script-tag-1.html") !== -1) {
    1616
     
    3333    for (var i = 0; i < numChildren; ++i) {
    3434        var child = record.children[i];
    35         if (child.type == timelineAgentRecordType.EvaluateScript)
     35        if (child.type === timelineAgentRecordType.EvaluateScript)
    3636            if (analyzeEvaluateScript(child))
    3737                return true;
     
    5151    for (var i = 0 ; i < numRecords; ++i) {
    5252        var record = timelineRecords[i];
    53         if (record.type == timelineAgentRecordType.ParseHTML) {
     53        if (record.type === timelineAgentRecordType.ParseHTML) {
    5454            // Uncomment to debug the ParseHTML data record
    5555            // dumpTimelineRecord(record, 0);
  • trunk/LayoutTests/inspector/timeline-script-tag-2.html

    r50828 r50830  
    1111    for (var i = 0; i < numChildren; ++i) {
    1212        var child = record.children[i];
    13         if (child.type == timelineAgentRecordType.MarkTimeline
    14             && child.data.message == timelineMark
    15             && record.data.url.indexOf("timeline-script-tag-1.html") !== -1) {
     13        if (child.type === timelineAgentRecordType.MarkTimeline
     14            && child.data.message === timelineMark
     15            && record.data.url.indexOf("timeline-script-tag-2.js") !== -1) {
    1616
    1717            // Finish printing the record as a tree
     
    2929function analyzeParseHTML(record)
    3030{
    31     // Now, dump the specific Script tag that includes the Marker and dump it in detail.
    3231    var numChildren = record.children ? record.children.length : 0;
    3332    for (var i = 0; i < numChildren; ++i) {
    3433        var child = record.children[i];
    35         if (child.type == timelineAgentRecordType.EvaluateScript)
     34        if (child.type === timelineAgentRecordType.EvaluateScript)
    3635            if (analyzeEvaluateScript(child))
    3736                return true;
     
    5150    for (var i = 0 ; i < numRecords; ++i) {
    5251        var record = timelineRecords[i];
    53         if (record.type == timelineAgentRecordType.ParseHTML) {
     52        if (record.type === timelineAgentRecordType.ParseHTML) {
    5453            // Uncomment to debug the ParseHTML data record
    5554            // dumpTimelineRecord(record, 0);
     
    7170<body onload="onload()">
    7271<p>
    73 Tests the Timeline API instrumentation of an HTML script tag.
     72Tests the Timeline API instrumentation of a script tag with an external script.
    7473</p>
    7574
    76 <script>
    77      // Mark this script tag so we can find it in the timeline data.
    78      console.markTimeline(timelineMark);
    79 </script>
     75<script src="timeline-script-tag-2.js"></script>
    8076</body>
    8177</html>
  • trunk/LayoutTests/inspector/timeline-test.js

    r50809 r50830  
    4040    if (level > 0)
    4141        prefix = prefix + "> ";
    42     if (record.type == timelineAgentRecordType.MarkTimeline) {
     42    if (record.type === timelineAgentRecordType.MarkTimeline) {
    4343        suffix = " : " + record.data.message;
    4444    }
     
    128128{
    129129    for (var prop in timelineAgentRecordType) {
    130         if (timelineAgentRecordType[prop] == numericType)
     130        if (timelineAgentRecordType[prop] === numericType)
    131131            return prop;
    132132    }
Note: See TracChangeset for help on using the changeset viewer.