Changeset 83284 in webkit


Ignore:
Timestamp:
Apr 8, 2011 4:20:29 AM (13 years ago)
Author:
podivilov@chromium.org
Message:

2011-04-07 Pavel Podivilov <podivilov@chromium.org>

Reviewed by Pavel Feldman.

Web Inspector: add test for script formatter worker.
https://bugs.webkit.org/show_bug.cgi?id=57447

  • inspector/debugger/script-formatter-expected.txt: Added.
  • inspector/debugger/script-formatter.html: Added.
  • platform/chromium/test_expectations.txt:

2011-04-07 Pavel Podivilov <podivilov@chromium.org>

Reviewed by Pavel Feldman.

Web Inspector: add test for script formatter worker.
https://bugs.webkit.org/show_bug.cgi?id=57447

Test: inspector/debugger/script-formatter.html

  • GNUmakefile.am:
  • WebCore.xcodeproj/project.pbxproj:
  • gyp/streamline-inspector-source.sh:
  • inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles): (WebInspector.DebuggerPresentationModel.prototype._formatter):
  • inspector/front-end/ScriptFormatterWorker.js:

2011-04-07 Pavel Podivilov <podivilov@chromium.org>

Reviewed by Pavel Feldman.

Web Inspector: add test for script formatter worker.
https://bugs.webkit.org/show_bug.cgi?id=57447

  • WebKit.gyp:
Location:
trunk
Files:
2 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r83283 r83284  
     12011-04-07  Pavel Podivilov  <podivilov@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Web Inspector: add test for script formatter worker.
     6        https://bugs.webkit.org/show_bug.cgi?id=57447
     7
     8        * inspector/debugger/script-formatter-expected.txt: Added.
     9        * inspector/debugger/script-formatter.html: Added.
     10        * platform/chromium/test_expectations.txt:
     11
    1122011-04-08  Kent Tamura  <tkent@chromium.org>
    213
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r83283 r83284  
    162162WONTFIX SKIP : http/tests/eventsource/workers = PASS TIMEOUT FAIL
    163163WONTFIX SKIP : http/tests/websocket/tests/workers/ = PASS TIMEOUT FAIL
     164WONTFIX SKIP : inspector/debugger/script-formatter.html = PASS TIMEOUT FAIL
    164165
    165166// Page Cache - based tests. Chromium disables page cache because the WebKit page cache keeps previously
  • trunk/Source/WebCore/ChangeLog

    r83276 r83284  
     12011-04-07  Pavel Podivilov  <podivilov@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Web Inspector: add test for script formatter worker.
     6        https://bugs.webkit.org/show_bug.cgi?id=57447
     7
     8        Test: inspector/debugger/script-formatter.html
     9
     10        * GNUmakefile.am:
     11        * WebCore.xcodeproj/project.pbxproj:
     12        * gyp/streamline-inspector-source.sh:
     13        * inspector/front-end/DebuggerPresentationModel.js:
     14        (WebInspector.DebuggerPresentationModel.prototype._addScript):
     15        (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
     16        (WebInspector.DebuggerPresentationModel.prototype._formatter):
     17        * inspector/front-end/ScriptFormatterWorker.js:
     18
    1192011-04-08  Andrey Adaikin  <aandrey@google.com>
    220
  • trunk/Source/WebCore/GNUmakefile.am

    r83263 r83284  
    822822        $(shell ls $(WebCore)/inspector/front-end/*.css)
    823823
     824webinspectoruglifyjsdir = ${datadir}/webkitgtk-@WEBKITGTK_API_VERSION@/webinspector/UglifyJS
     825dist_webinspectoruglifyjs_DATA = \
     826        $(shell ls $(WebCore)/inspector/front-end/UglifyJS/*.js)
     827
    824828webinspectorimagesdir = ${datadir}/webkitgtk-@WEBKITGTK_API_VERSION@/webinspector/Images
    825829dist_webinspectorimages_DATA = \
     
    832836${GENSOURCES_INSPECTOR}/inspector.html: $(WebCore)/inspector/front-end/*.html \
    833837                $(WebCore)/inspector/front-end/*.js \
     838                $(WebCore)/inspector/front-end/UglifyJS/*.js \
    834839                $(WebCore)/inspector/front-end/*.css \
    835840                $(WebCore)/inspector/front-end/Images/* \
    836841                DerivedSources/WebCore/InspectorBackendStub.js \
    837842                $(WebCore)/English.lproj/localizedStrings.js
     843        $(AM_V_GEN)mkdir -p ${GENSOURCES_INSPECTOR}/UglifyJS
    838844        $(AM_V_GEN)mkdir -p ${GENSOURCES_INSPECTOR}/images
    839845        $(AM_V_at)cp ${dist_webinspector_DATA} ${GENSOURCES_INSPECTOR}
     846        $(AM_V_at)cp ${dist_webinspectoruglifyjs_DATA} ${GENSOURCES_INSPECTOR}/UglifyJS
    840847        $(AM_V_at)cp ${dist_webinspectorimages_DATA} ${GENSOURCES_INSPECTOR}/images
    841848
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r83256 r83284  
    2300023000                        runOnlyForDeploymentPostprocessing = 0;
    2300123001                        shellPath = /bin/sh;
    23002                         shellScript = "# Don't do anything for Debug builds, so the Inspector is easier to debug.\nif [[ ${CONFIGURATION:=Debug} == \"Debug\" ]]; then\n    exit\nfi\n\n# Combine all script resources in the inspector.html file.\n\"$SRCROOT/inspector/combine-javascript-resources.pl\" --input-html \"${SRCROOT}/inspector/front-end/inspector.html\" --generated-scripts-dir ${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore --output-dir \"${DERIVED_FILE_DIR}/WebCore\" --output-script-name inspector.js\n\n# Inline script imports in ScriptFormatterWorker.js file.\n\"$SRCROOT/inspector/inline-javascript-imports.py\" \"${SRCROOT}/inspector/front-end/ScriptFormatterWorker.js\" \"${SRCROOT}/inspector/front-end/UglifyJS\" \"${DERIVED_FILE_DIR}/WebCore/scriptFormatterWorker.js\"\n\nif [ -d \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector\" ]; then\n    # Remove any JavaScript files, since they will be replaced with the combined file.\n    cd \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector\"\n    rm *.js\n\n    # Copy the modified HTML file and the combined scripts.\n    cp \"${DERIVED_FILE_DIR}/WebCore/inspector.html\" inspector.html\n    cp \"${DERIVED_FILE_DIR}/WebCore/inspector.js\" inspector.js\n    cp \"${DERIVED_FILE_DIR}/WebCore/scriptFormatterWorker.js\" scriptFormatterWorker.js\nfi\n";
     23002                        shellScript = "# Don't do anything for Debug builds, so the Inspector is easier to debug.\nif [[ ${CONFIGURATION:=Debug} == \"Debug\" ]]; then\n    exit\nfi\n\n# Combine all script resources in the inspector.html file.\n\"$SRCROOT/inspector/combine-javascript-resources.pl\" --input-html \"${SRCROOT}/inspector/front-end/inspector.html\" --generated-scripts-dir ${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore --output-dir \"${DERIVED_FILE_DIR}/WebCore\" --output-script-name inspector.js\n\n# Inline script imports in ScriptFormatterWorker.js file.\n\"$SRCROOT/inspector/inline-javascript-imports.py\" \"${SRCROOT}/inspector/front-end/ScriptFormatterWorker.js\" \"${SRCROOT}/inspector/front-end\" \"${DERIVED_FILE_DIR}/WebCore/scriptFormatterWorker.js\"\n\nif [ -d \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector\" ]; then\n    # Remove any JavaScript files, since they will be replaced with the combined file.\n    cd \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector\"\n    rm *.js\n\n    # Copy the modified HTML file and the combined scripts.\n    cp \"${DERIVED_FILE_DIR}/WebCore/inspector.html\" inspector.html\n    cp \"${DERIVED_FILE_DIR}/WebCore/inspector.js\" inspector.js\n    cp \"${DERIVED_FILE_DIR}/WebCore/scriptFormatterWorker.js\" scriptFormatterWorker.js\nfi\n";
    2300323003                };
    2300423004                1C81BA330E97357C00266E07 /* Copy Inspector Resources */ = {
  • trunk/Source/WebCore/gyp/streamline-inspector-source.sh

    r83040 r83284  
    1010
    1111# Inline script imports in ScriptFormatterWorker.js file.
    12 "$SRCROOT/../inspector/inline-javascript-imports.py" "${SRCROOT}/../inspector/front-end/ScriptFormatterWorker.js" "${SRCROOT}/../inspector/front-end/UglifyJS" "${DERIVED_FILE_DIR}/WebCore/scriptFormatterWorker.js"
     12"$SRCROOT/../inspector/inline-javascript-imports.py" "${SRCROOT}/../inspector/front-end/ScriptFormatterWorker.js" "${SRCROOT}/../inspector/front-end" "${DERIVED_FILE_DIR}/WebCore/scriptFormatterWorker.js"
    1313
    1414if [ -d "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector" ]; then
  • trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js

    r83190 r83284  
    106106            sourceFile = new WebInspector.SourceFile(sourceFileId, script, contentChanged.bind(this));
    107107        else
    108             sourceFile = new WebInspector.FormattedSourceFile(sourceFileId, script, contentChanged.bind(this), this._formatter);
     108            sourceFile = new WebInspector.FormattedSourceFile(sourceFileId, script, contentChanged.bind(this), this._formatter());
    109109        this._sourceFiles[sourceFileId] = sourceFile;
    110110
     
    196196    {
    197197        this._formatSourceFiles = !this._formatSourceFiles;
    198         if (this._formatSourceFiles && !this._formatter)
    199             this._formatter = new WebInspector.ScriptFormatter();
    200198
    201199        var messages = this._messages;
     
    211209        if (WebInspector.debuggerModel.callFrames)
    212210            this._debuggerPaused();
     211    },
     212
     213    _formatter: function()
     214    {
     215        if (!this._scriptFormatter)
     216            this._scriptFormatter = new WebInspector.ScriptFormatter();
     217        return this._scriptFormatter;
    213218    },
    214219
  • trunk/Source/WebCore/inspector/front-end/ScriptFormatterWorker.js

    r83151 r83284  
    7171
    7272var exports = {};
    73 importScripts("parse-js.js");
     73importScripts("UglifyJS/parse-js.js");
    7474var parse = exports;
    7575
    7676var exports = {};
    77 importScripts("process.js");
     77importScripts("UglifyJS/process.js");
    7878var process = exports;
  • trunk/Source/WebKit/chromium/ChangeLog

    r83282 r83284  
     12011-04-07  Pavel Podivilov  <podivilov@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Web Inspector: add test for script formatter worker.
     6        https://bugs.webkit.org/show_bug.cgi?id=57447
     7
     8        * WebKit.gyp:
     9
    1102011-04-08  Kent Tamura  <tkent@chromium.org>
    211
  • trunk/Source/WebKit/chromium/WebKit.gyp

    r83282 r83284  
    11901190                            '<@(webinspector_files)'
    11911191                        ],
    1192                         'search_path': '../../WebCore/inspector/front-end/UglifyJS',
     1192                        'search_path': '../../WebCore/inspector/front-end',
    11931193                        'outputs': ['<(PRODUCT_DIR)/resources/inspector/ScriptFormatterWorker.js'],
    11941194                        'action': ['python', '<@(_script_name)', '<@(_input_file)', '<@(_search_path)', '<@(_outputs)'],
Note: See TracChangeset for help on using the changeset viewer.