Index: LayoutTests/inspector-enabled/sources/debugger/linkifier.html |
diff --git a/LayoutTests/inspector-enabled/sources/debugger/linkifier.html b/LayoutTests/inspector-enabled/sources/debugger/linkifier.html |
deleted file mode 100644 |
index ab6811ece23026638db0ea1d7d7631566eb58dd8..0000000000000000000000000000000000000000 |
--- a/LayoutTests/inspector-enabled/sources/debugger/linkifier.html |
+++ /dev/null |
@@ -1,98 +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 dummyScript() |
-{ |
- console.log("dummy string"); |
-} |
- |
-function onload() |
-{ |
- if (window.testRunner) { |
- testRunner.waitUntilDone(); |
- testRunner.showWebInspector(); |
- } |
- runTest(); |
-} |
- |
-function test() |
-{ |
- InspectorTest.startDebuggerTest(waitForScripts); |
- var panel = WebInspector.inspectorView.panel("sources"); |
- var scriptFormatter = InspectorTest.scriptFormatter(); |
- var linkifier; |
- var link; |
- var script; |
- var uiSourceCode; |
- |
- function waitForScripts() |
- { |
- InspectorTest.showScriptSource("linkifier.html", debuggerTest); |
- } |
- |
- function debuggerTest() |
- { |
- var scripts = WebInspector.debuggerModel.scripts; |
- for (var scriptId in scripts) { |
- var scriptCandidate = scripts[scriptId]; |
- if (scriptCandidate.sourceURL === WebInspector.resourceTreeModel.inspectedPageURL() && scriptCandidate.lineOffset === 4) { |
- script = scriptCandidate; |
- break; |
- } |
- } |
- |
- uiSourceCode = WebInspector.workspace.uiSourceCodeForOriginURL(WebInspector.resourceTreeModel.inspectedPageURL()); |
- var linkifyMe = "at triggerError (http://localhost/show/:22:11)"; |
- var fragment = WebInspector.linkifyStringAsFragment(linkifyMe); |
- var anchor = fragment.querySelector('a'); |
- InspectorTest.addResult("The string \"" + linkifyMe + " \" linkifies to url: " + anchor.href); |
- InspectorTest.addResult("The lineNumber is " + anchor.lineNumber + " with type " + (typeof anchor.lineNumber)); |
- InspectorTest.addResult("The columnNumber is " + anchor.columnNumber + " with type " + (typeof anchor.columnNumber)); |
- |
- linkifier = new WebInspector.Linkifier(); |
- var count1 = liveLocationsCount(); |
- link = linkifier.linkifyLocation(WebInspector.targetManager.activeTarget(), WebInspector.resourceTreeModel.inspectedPageURL(), 8, 0, "dummy-class"); |
- var count2 = liveLocationsCount(); |
- |
- InspectorTest.addResult("listeners added on raw source code: " + (count2 - count1)); |
- InspectorTest.addResult("original location: " + link.textContent); |
- InspectorTest.addSniffer(WebInspector.ScriptFormatterEditorAction.prototype, "_updateButton", uiSourceCodeScriptFormatted); |
- scriptFormatter._toggleFormatScriptSource(); |
- } |
- |
- function uiSourceCodeScriptFormatted() |
- { |
- InspectorTest.addResult("pretty printed location: " + link.textContent); |
- scriptFormatter._discardFormattedUISourceCodeScript(panel.visibleView.uiSourceCode()); |
- InspectorTest.addResult("reverted location: " + link.textContent); |
- |
- var count1 = liveLocationsCount(); |
- linkifier.reset(); |
- var count2 = liveLocationsCount(); |
- |
- InspectorTest.addResult("listeners removed from raw source code: " + (count1 - count2)); |
- |
- InspectorTest.completeDebuggerTest(); |
- } |
- |
- function liveLocationsCount() |
- { |
- return script._locations.size(); |
- } |
-} |
- |
-</script> |
-</head> |
- |
-<body onload="onload()"> |
-<p> |
-Tests that Linkifier works correctly. |
-<p> |
- |
-</body> |
-</html> |