| Index: LayoutTests/inspector-enabled/sources/debugger/script-formatter-console.html
|
| ===================================================================
|
| --- LayoutTests/inspector-enabled/sources/debugger/script-formatter-console.html (revision 176341)
|
| +++ LayoutTests/inspector-enabled/sources/debugger/script-formatter-console.html (working copy)
|
| @@ -1,84 +0,0 @@
|
| -<html>
|
| -<head>
|
| -<script src="../../../http/tests/inspector/inspector-test.js"></script>
|
| -<script src="../../../http/tests/inspector/debugger-test.js"></script>
|
| -<script>
|
| -
|
| -function nonFormattedFunction() { var i = 2 + 2; var a = 4; return a + i; }
|
| -
|
| -function f1()
|
| -{
|
| - console.error("Test message.");
|
| -}
|
| -
|
| -function onload()
|
| -{
|
| - if (window.testRunner) {
|
| - testRunner.waitUntilDone();
|
| - testRunner.showWebInspector();
|
| - }
|
| - runTest();
|
| -}
|
| -
|
| -var test = function()
|
| -{
|
| - var panel = WebInspector.inspectorView.showPanel("sources");
|
| - var worker = new Worker("ScriptFormatterWorker.js");
|
| - var sourceFrame;
|
| - var scriptFormatter = InspectorTest.scriptFormatter();
|
| -
|
| - InspectorTest.runDebuggerTestSuite([
|
| - function testConsoleMessagesForFormattedScripts(next)
|
| - {
|
| - InspectorTest.showScriptSource("script-formatter-console.html", didShowScriptSource);
|
| -
|
| - function didShowScriptSource(frame)
|
| - {
|
| - sourceFrame = frame;
|
| - InspectorTest.evaluateInPage("f1()", didEvaluate);
|
| - }
|
| -
|
| - function didEvaluate()
|
| - {
|
| - dumpConsoleMessageURLs();
|
| - InspectorTest.addResult("Pre-format row message list:");
|
| - InspectorTest.addResult(JSON.stringify(Object.keys(sourceFrame._rowMessages)));
|
| - InspectorTest.addResult(JSON.stringify(Object.keys(sourceFrame._messageBubbles)));
|
| - InspectorTest.addSniffer(WebInspector.ScriptFormatterEditorAction.prototype, "_updateButton", uiSourceCodeScriptFormatted);
|
| - scriptFormatter._toggleFormatScriptSource();
|
| - }
|
| -
|
| - function uiSourceCodeScriptFormatted()
|
| - {
|
| - dumpConsoleMessageURLs();
|
| - InspectorTest.addResult("Post-format row message list:");
|
| - var formattedSourceFrame = panel.visibleView;
|
| - InspectorTest.addResult(JSON.stringify(Object.keys(formattedSourceFrame._rowMessages)));
|
| - InspectorTest.addResult(JSON.stringify(Object.keys(formattedSourceFrame._messageBubbles)));
|
| - next();
|
| - }
|
| - }
|
| - ]);
|
| -
|
| - function dumpConsoleMessageURLs()
|
| - {
|
| - WebInspector.inspectorView.panel("console");
|
| - var messages = WebInspector.ConsolePanel._view()._visibleViewMessages;
|
| - for (var i = 0; i < messages.length; ++i) {
|
| - var element = messages[i].toMessageElement();
|
| - var anchor = element.querySelector(".console-message-url");
|
| - InspectorTest.addResult(anchor.textContent);
|
| - }
|
| - }
|
| -}
|
| -
|
| -</script>
|
| -
|
| -</head>
|
| -
|
| -<body onload="onload()">
|
| -<p>Tests that the script formatting changes console line numbers.
|
| -</p>
|
| -
|
| -</body>
|
| -</html>
|
|
|