3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/debugger-test.js"></script>
12 func1.displayName = "my.framework.foo";
14 var func2 = (function() {
15 var f = function() { func1(); }
16 f.displayName = "my.framework.bar";
20 var func3 = function() { func2(); }
21 func3.__defineGetter__("displayName", function() { error = true; throw new Error("Should not crash!"); });
23 function func4() { func3(); }
24 func4.__defineGetter__("displayName", function() { error = true; return "FAIL: Should not execute getters!"; });
26 function func5() { func4(); }
27 func5.displayName = "my.framework.func5";
28 func5.__defineSetter__("displayName", function() { error = true; throw new Error("FAIL: Should not call setter!"); });
30 function func6() { func5(); }
31 func6.displayName = { "foo": 6, toString: function() { error = true; return "FAIL: Should not call toString!"; } };
33 function testFunction()
36 arguments.callee.displayName = "<anonymous_inside_testFunction>";
39 console.assert(!error, "FAIL: No getter or setter or toString should have been called!");
41 testFunction.displayName = "<InspectorTest::testFunction>";
45 InspectorTest.startDebuggerTest(step1);
49 InspectorTest.runTestFunctionAndWaitUntilPaused(step2);
52 function step2(callFrames)
54 InspectorTest.captureStackTrace(callFrames);
55 InspectorTest.completeDebuggerTest();
63 <body onload="runTest()">
64 <p>Tests that we display function's "displayName" property in the call stack.
65 <a href="http://code.google.com/p/chromium/issues/detail?id=17356">CrBug 17356</a>