Changeset 141393 in webkit


Ignore:
Timestamp:
Jan 31, 2013 2:52:41 AM (11 years ago)
Author:
yurys@chromium.org
Message:

Web Inspector: test that nodes from the same detached DOM tree will get into one group in heap snapshot
https://bugs.webkit.org/show_bug.cgi?id=108202

Reviewed by Vsevolod Vlasov.

Source/WebCore:

Test: inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree.html

  • inspector/front-end/JSHeapSnapshot.js:

(WebInspector.JSHeapSnapshotNode.prototype.className): removed unnecessary i18n.

LayoutTests:

Test that JS wrappers for all DOM nodes from the same detached DOM tree will get into
single "Detached DOM Tree" entry in the JS heap snapshot.

  • http/tests/inspector-protocol/resources/InspectorTest.js:

(InspectorTest.importScript):

  • inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree-expected.txt: Added.
  • inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree.html: Added. I started

with writing simplified version of WebInspector.JSHeapSnapshot just for tests
but it soon it became clear that we would need to reimplement too much functionality
of WebInspector.JSHeapSnapshot so I decided not to reinvent the wheel and just import
original heap snapshot model.

  • inspector-protocol/heap-profiler/resources/heap-snapshot-common.js: Added.

(InspectorTest.takeHeapSnapshot):

Location:
trunk
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r141388 r141393  
     12013-01-30  Yury Semikhatsky  <yurys@chromium.org>
     2
     3        Web Inspector: test that nodes from the same detached DOM tree will get into one group in heap snapshot
     4        https://bugs.webkit.org/show_bug.cgi?id=108202
     5
     6        Reviewed by Vsevolod Vlasov.
     7
     8        Test that JS wrappers for all DOM nodes from the same detached DOM tree will get into
     9        single "Detached DOM Tree" entry in the JS heap snapshot.
     10
     11        * http/tests/inspector-protocol/resources/InspectorTest.js:
     12        (InspectorTest.importScript):
     13        * inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree-expected.txt: Added.
     14        * inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree.html: Added. I started
     15        with writing simplified version of WebInspector.JSHeapSnapshot just for tests
     16        but it soon it became clear that we would need to reimplement too much functionality
     17        of WebInspector.JSHeapSnapshot so I decided not to reinvent the wheel and just import
     18        original heap snapshot model.
     19        * inspector-protocol/heap-profiler/resources/heap-snapshot-common.js: Added.
     20        (InspectorTest.takeHeapSnapshot):
     21
    1222013-01-31  Yury Semikhatsky  <yurys@chromium.org>
    223
  • trunk/LayoutTests/http/tests/inspector-protocol/resources/InspectorTest.js

    r141100 r141393  
    9090}
    9191
     92
     93/**
     94 * @param {string} scriptName
     95 */
     96InspectorTest.importScript = function(scriptName)
     97{
     98    var xhr = new XMLHttpRequest();
     99    xhr.open("GET", scriptName, false);
     100    xhr.send(null);
     101    window.eval(xhr.responseText);
     102}
     103
    92104window.addEventListener("message", function(event) {
    93105    try {
  • trunk/Source/WebCore/ChangeLog

    r141390 r141393  
     12013-01-30  Yury Semikhatsky  <yurys@chromium.org>
     2
     3        Web Inspector: test that nodes from the same detached DOM tree will get into one group in heap snapshot
     4        https://bugs.webkit.org/show_bug.cgi?id=108202
     5
     6        Reviewed by Vsevolod Vlasov.
     7
     8        Test: inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree.html
     9
     10        * inspector/front-end/JSHeapSnapshot.js:
     11        (WebInspector.JSHeapSnapshotNode.prototype.className): removed unnecessary i18n.
     12
    1132013-01-31  Kentaro Hara  <haraken@chromium.org>
    214
  • trunk/Source/WebCore/inspector/front-end/JSHeapSnapshot.js

    r140953 r141393  
    323323        switch (type) {
    324324        case "hidden":
    325             return WebInspector.UIString("(system)");
     325            return "(system)";
    326326        case "object":
    327327        case "native":
    328328            return this.name();
    329329        case "code":
    330             return WebInspector.UIString("(compiled code)");
     330            return "(compiled code)";
    331331        default:
    332332            return "(" + type + ")";
Note: See TracChangeset for help on using the changeset viewer.