Web Inspector: Test Debugger.scriptParsed events received after opening inspector frontend
https://bugs.webkit.org/show_bug.cgi?id=150753
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-10-30
Reviewed by Timothy Hatcher.
Source/JavaScriptCore:
* parser/Parser.h:
(JSC::Parser<LexerType>::parse):
Only set the directives on the SourceProvider if we were parsing the
entire file (Program or Module), not if we are in function parsing mode.
This was inadvertently clearing the directives stored on the
SourceProvider when the function parse didn't see directives and reset
the values on the source provider.
LayoutTests:
Explicit test for the scriptParsed events we expect to see
when first opening the inspector on an already open page.
We do not expect to see some scripts (built-ins) but do expect
to see all user scripts evaluated on the page.
* inspector/debugger/scriptParsed-expected.txt: Added.
* inspector/debugger/scriptParsed.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191839
268f45cc-cd09-0410-ab3c-
d52691b4dbfc