Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / sources / debugger / script-extract-outline.html
blob3ff2dfd73076a03638dc7e2437a2f06d2a5b79f7
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="resources/obfuscated.js"></script>
6 <script id="outline">function first(x,y) { }
7 var second = function(y
8 ,
9 z) { }
10 Object = function(arg) {
12 Object.prototype.functionOnPrototype = function ( a, b ,
13 c, d ,
14 e , f ) { function innerFunction1() {
15 var innerFunction2 = function(arg1,arg2) {} } }
16 /**
17 * @constructor
18 * @param {string} name
20 window.Cat = function(name)
22 this._name = name;
25 window.Cat.prototype = {
26 mew: function()
28 console.log("Mew!");
31 get name()
33 return this._name;
36 feed: function()
38 // noop
41 set name(newName)
43 this._name = newName;
46 </script>
48 <script>
50 function getScriptText()
52 return document.querySelector("#outline").textContent;
55 function test()
58 var worker = new WorkerRuntime.Worker("script_formatter_worker");
60 worker.onmessage = InspectorTest.safeWrap(function(event)
62 InspectorTest.addObject(event.data);
63 InspectorTest.completeTest();
64 });
66 worker.onerror = function(event)
68 InspectorTest.addResult("Error in worker: " + event.data);
69 InspectorTest.completeTest();
72 InspectorTest.evaluateInPage("getScriptText()", onScriptText);
73 function onScriptText(result)
75 worker.postMessage({ method: "javaScriptOutline", params: { content: result.value } });
79 </script>
81 </head>
83 <body onload="runTest()">
84 <p>Tests the script outline extraction functionality.
85 </p>
87 </body>
88 </html>