Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / linkifier.html
blob2b930aee303e0eb13f36204f6798b343a2ba75f0
1 <html>
2 <head>
3 <script src="../http/tests/inspector/inspector-test.js"></script>
4 <script src="../http/tests/inspector/debugger-test.js"></script>
5 <script>
6 function test()
8 var script;
10 InspectorTest.startDebuggerTest(waitForScripts);
12 function waitForScripts()
14 InspectorTest.showScriptSource("linkifier.html", debuggerTest);
17 function debuggerTest()
19 var url = InspectorTest.resourceTreeModel.inspectedPageURL();
20 var target = WebInspector.targetManager.mainTarget();
21 var scripts = InspectorTest.debuggerModel.scripts;
22 for (var scriptId in scripts) {
23 var scriptCandidate = scripts[scriptId];
24 if (scriptCandidate.sourceURL === url) {
25 script = scriptCandidate;
26 break;
30 dumpLiveLocationsCount();
32 var linkifier = new WebInspector.Linkifier();
33 InspectorTest.addResult("Created linkifier");
34 dumpLiveLocationsCount();
36 var linkA = linkifier.linkifyScriptLocation(target, null, url, 10);
37 InspectorTest.addResult("Linkified script location A");
38 dumpLiveLocationsCount();
40 var linkB = linkifier.linkifyScriptLocation(target, null, url, 15);
41 InspectorTest.addResult("Linkified script location B");
42 dumpLiveLocationsCount();
44 linkifier.disposeAnchor(target, linkA);
45 InspectorTest.addResult("Disposed link A");
46 dumpLiveLocationsCount();
48 linkifier.reset();
49 InspectorTest.addResult("Reseted linkifier");
50 dumpLiveLocationsCount();
52 linkifier.dispose();
53 InspectorTest.addResult("Disposed linkifier");
54 dumpLiveLocationsCount();
56 InspectorTest.completeTest();
59 function dumpLiveLocationsCount()
61 InspectorTest.addResult("Live locations count: " + WebInspector.debuggerWorkspaceBinding._ensureInfoForScript(script)._locations.size);
62 InspectorTest.addResult("");
66 </script>
67 </head>
69 <body onload="runTest()">
70 <p>
71 Tests that Linkifier works correctly.
72 <p>
74 </body>
75 </html>