Test for Bug 30212 - Each JS execution in console adds extra item into "scripts" combo
The following manual test creates functions via eval() and the
Function() constructor, some functions are named using the
//@sourceURL=
directive, some aren't. Some contain
debugger commands, some don't.
The functions named f_named_X are 'named' via the
//@sourceURL=
directive, the ones named f_unnamed_X
are not. The 'named' functions should show up in the Scripts select element used
to select a resource/script to view, the 'unnamed' ones should not.
open this page with Web Inspector
switch to the Scripts panel, enabling debug if required
the available scripts in the select element should be:
click this button:
debugger should stop in the clickHandler
function
at this point, start stepping into the code
you should be able to step into functions f_unnamed_1()
and f_unnamed_2()
. There are no resource/scripts in the
select element that contain these functions, until you actually are paused
in them. At that point, entries for these functions will be in the select element,
named: "(program)". After pausing in both functions, there will be two "(program)"
entries.
you should be able to use the next/prev buttons (to the left of the select element) to switch to other resources/scripts that have been opened, including the ones containing these functions
you should be able to click on the functions that exist in the 'hidden' resources from the Call Stack, and be shown the source; click around the stack trace entries to verify
rather than stepping into the f_named_3()
call, press the
resume button
the debugger should stop in f_named_3()
because of the
debugger
command
rather than stepping into the f_unnamed_3()
call, press the
resume button
the debugger should stop in f_unnamed_3()
because of the
debugger
command. At this point, a third "(program)" entry for
this function is added to the select element.