Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Unified Diff: LayoutTests/inspector/sources/debugger/script-extract-outline.html

Issue 485503002: DevTools: support getters and setters in javascript outline (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaseline Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/inspector/sources/debugger/script-extract-outline-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | LayoutTests/inspector/sources/debugger/script-extract-outline-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698