| Index: LayoutTests/inspector/sources/debugger/script-extract-outline.html
|
| diff --git a/LayoutTests/inspector/sources/debugger/script-extract-outline.html b/LayoutTests/inspector/sources/debugger/script-extract-outline.html
|
| index 420b90374bd4a65b08572f9801cd2087f23c3b8c..7be3158af217b968116b12a1d30f6b7eef43d443 100644
|
| --- a/LayoutTests/inspector/sources/debugger/script-extract-outline.html
|
| +++ b/LayoutTests/inspector/sources/debugger/script-extract-outline.html
|
| @@ -3,12 +3,59 @@
|
| <script src="../../../http/tests/inspector/inspector-test.js"></script>
|
| <script src="resources/obfuscated.js"></script>
|
|
|
| +<script id="outline">function first(x,y) { }
|
| + var second = function(y
|
| + ,
|
| +z) { }
|
| + Object = function(arg) {
|
| +}
|
| + Object.prototype.functionOnPrototype = function ( a, b ,
|
| +c, d ,
|
| + e , f ) { function innerFunction1() {
|
| + var innerFunction2 = function(arg1,arg2) {} } }
|
| +/**
|
| + * @constructor
|
| + * @param {string} name
|
| + */
|
| +window.Cat = function(name)
|
| +{
|
| + this._name = name;
|
| +}
|
| +
|
| +window.Cat.prototype = {
|
| + mew: function()
|
| + {
|
| + console.log("Mew!");
|
| + },
|
| +
|
| + get name()
|
| + {
|
| + return this._name;
|
| + },
|
| +
|
| + feed: function()
|
| + {
|
| + // noop
|
| + },
|
| +
|
| + set name(newName)
|
| + {
|
| + this._name = newName;
|
| + }
|
| +};
|
| +</script>
|
| +
|
| <script>
|
|
|
| -var test = function()
|
| +function getScriptText()
|
| {
|
| + return document.querySelector("#outline").textContent;
|
| +}
|
| +
|
| +function test()
|
| +{
|
| +
|
| var worker = Runtime.startWorker("script_formatter_worker");
|
| - var parsedScript = "function first(x,y) { }\n var second = function(y \n , \nz) { }\n Object = function(arg) {\n}\n Object.prototype.functionOnPrototype = function ( a, b , \n c, d , \n e , f ) { function innerFunction1() {\n var innerFunction2 = function(arg1,arg2) {} } }";
|
|
|
| worker.onmessage = InspectorTest.safeWrap(function(event)
|
| {
|
| @@ -22,7 +69,11 @@ var test = function()
|
| InspectorTest.completeTest();
|
| };
|
|
|
| - worker.postMessage({ method: "javaScriptOutline", params: { content: parsedScript } });
|
| + InspectorTest.evaluateInPage("getScriptText()", onScriptText);
|
| + function onScriptText(result)
|
| + {
|
| + worker.postMessage({ method: "javaScriptOutline", params: { content: result.value } });
|
| + }
|
| }
|
|
|
| </script>
|
|
|