Skip to content
Permalink
Browse files
2011-03-30 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-03-30  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:
        * inspector/front-end/DebuggerPresentationModel.js:
        (WebInspector.DebuggerPresentationModel):
        (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):

Canonical link: https://commits.webkit.org/72458@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@82667 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Pavel Podivilov committed Apr 1, 2011
1 parent 49266d2 commit 3685936964fb0277b34271e2248f0096c52de848
Showing 7 changed files with 75 additions and 2 deletions.
@@ -1,3 +1,14 @@
2011-03-30 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-03-31 Yury Semikhatsky <yurys@chromium.org>

Reviewed by Pavel Feldman.
@@ -0,0 +1,5 @@
Tests the script formatting functionality.


Running: testScriptFormatterWorker

@@ -0,0 +1,41 @@
<html>
<head>
<script src="../../http/tests/inspector/inspector-test.js"></script>
<script src="../../http/tests/inspector/debugger-test.js"></script>

<script>

var test = function()
{
InspectorTest.runTestSuite([
function testScriptFormatterWorker(next)
{
var worker = new Worker("ScriptFormatterWorker.js");

worker.onmessage = InspectorTest.safeWrap(function(event)
{
InspectorTest.assertEquals("var x = 0;", event.data.formattedSource);
InspectorTest.completeTest();
});

worker.onerror = function(event)
{
InspectorTest.addResult("Error in worker: " + event.data);
InspectorTest.completeTest();
};

worker.postMessage("var x=0");
}
]);
}

</script>

</head>

<body onload="runTest()">
<p>Tests the script formatting functionality.
</p>

</body>
</html>
@@ -161,6 +161,7 @@ WONTFIX SKIP : http/tests/workers = PASS TIMEOUT FAIL
WONTFIX SKIP : http/tests/xmlhttprequest/workers = PASS TIMEOUT FAIL
WONTFIX SKIP : http/tests/eventsource/workers = PASS TIMEOUT FAIL
WONTFIX SKIP : http/tests/websocket/tests/workers/ = PASS TIMEOUT FAIL
WONTFIX SKIP : inspector/debugger/script-formatter.html = PASS TIMEOUT FAIL

// Page Cache - based tests. Chromium disables page cache because the WebKit page cache keeps previously
// loaded pages alive in memory to be able to quickly substitute them when user clicks History buttons.
@@ -1,3 +1,17 @@
2011-03-30 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:
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel):
(WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):

2011-03-30 Pavel Podivilov <podivilov@chromium.org>

Reviewed by Pavel Feldman.
@@ -5194,6 +5194,7 @@ dist_webinspector_DATA = \
$(WebCore)/English.lproj/localizedStrings.js \
DerivedSources/WebCore/InspectorBackendStub.js \
$(shell ls $(WebCore)/inspector/front-end/*.js) \
$(shell ls $(WebCore)/inspector/front-end/UglifyJS/*.js) \
$(shell ls $(WebCore)/inspector/front-end/*.html) \
$(shell ls $(WebCore)/inspector/front-end/*.css)

@@ -5207,6 +5208,7 @@ dist_webinspectorimages_DATA = \
noinst_DATA = ${GENSOURCES_INSPECTOR}/inspector.html
${GENSOURCES_INSPECTOR}/inspector.html: $(WebCore)/inspector/front-end/*.html \
$(WebCore)/inspector/front-end/*.js \
$(WebCore)/inspector/front-end/UglifyJS/*.js \
$(WebCore)/inspector/front-end/*.css \
$(WebCore)/inspector/front-end/Images/* \
DerivedSources/WebCore/InspectorBackendStub.js \
@@ -35,6 +35,7 @@ WebInspector.DebuggerPresentationModel = function()
this._presentationBreakpoints = {};
this._presentationCallFrames = [];
this._selectedCallFrameIndex = 0;
this._formatter = new WebInspector.ScriptFormatter();

WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.DebuggerWasEnabled, this._debuggerWasEnabled, this);
WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.ParsedScriptSource, this._parsedScriptSource, this);
@@ -180,8 +181,6 @@ WebInspector.DebuggerPresentationModel.prototype = {
toggleFormatSourceFiles: function()
{
this._formatSourceFiles = !this._formatSourceFiles;
if (this._formatSourceFiles && !this._formatter)
this._formatter = new WebInspector.ScriptFormatter();

var messages = this._messages;
this._sourceFiles = {};

0 comments on commit 3685936

Please sign in to comment.