@@ -229,4 +229,53 @@ public void argumentsAsParameter() throws Exception {
229229
230230 loadPageVerifyTitle2 (html );
231231 }
232+
233+ /**
234+ * @throws Exception if the test fails
235+ */
236+ @ Test
237+ @ Alerts ({"function/" , "function/" , "true" })
238+ public void argumentsCallee () throws Exception {
239+ final String html = DOCTYPE_HTML
240+ + "<html><body>"
241+ + "<script>\n "
242+ + " 'use strict';\n "
243+ + LOG_TITLE_FUNCTION
244+ + "function foo() {\n "
245+ + " let desc = Object.getOwnPropertyDescriptor(arguments, 'callee');\n "
246+ + " log(typeof desc.get + '/' + desc.get.name);\n "
247+ + " log(typeof desc.set + '/' + desc.set.name);\n "
248+ + " log(desc.get === desc.set);\n "
249+ + "}\n "
250+ + "foo();\n "
251+ + "</script></body></html>" ;
252+
253+ loadPageVerifyTitle2 (html );
254+ }
255+
256+ /**
257+ * @throws Exception if the test fails
258+ */
259+ @ Test
260+ @ Alerts ({"true" , "true" })
261+ public void argumentsCalleeDifferentFunctions () throws Exception {
262+ final String html = DOCTYPE_HTML
263+ + "<html><body>"
264+ + "<script>\n "
265+ + " 'use strict';\n "
266+ + LOG_TITLE_FUNCTION
267+ + "function foo1() {\n "
268+ + " return Object.getOwnPropertyDescriptor(arguments, 'callee');\n "
269+ + "}\n "
270+ + "function foo2() {\n "
271+ + " return Object.getOwnPropertyDescriptor(arguments, 'callee');\n "
272+ + "}\n "
273+ + "let desc1 = foo1();\n "
274+ + "let desc2 = foo2();\n "
275+ + "log(desc1.get === desc2.get);\n "
276+ + "log(desc1.set === desc2.set);\n "
277+ + "</script></body></html>" ;
278+
279+ loadPageVerifyTitle2 (html );
280+ }
232281}
0 commit comments