Summary: | Web Inspector: Test Debugger.scriptParsed events received after opening inspector frontend | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> | ||||
Component: | Web Inspector | Assignee: | Joseph Pecoraro <joepeck> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bburg, benjamin, commit-queue, ggaren, graouts, joepeck, mattbaker, nvasilyev, saam, timothy, webkit-bug-importer, ysuzuki | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Joseph Pecoraro
2015-10-30 20:08:09 PDT
Created attachment 264463 [details]
[PATCH] Proposed Fix
Comment on attachment 264463 [details] [PATCH] Proposed Fix Clearing flags on attachment: 264463 Committed r191839: <http://trac.webkit.org/changeset/191839> All reviewed patches have been landed. Closing bug. Comment on attachment 264463 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=264463&action=review This is a nice test. Does it cover the JSC change as well? > LayoutTests/inspector/debugger/scriptParsed.html:86 > + foundInjectedScriptSourceScript = true; I suppose this could be foundXXX = foundXXX || isXXX(), but it doesn't read any better. I would have done foundXXX |= isXXX() since it isn't that expensive to recheck. Alternatively, you could run Array.some() with a lambda for each check. (In reply to comment #5) > Comment on attachment 264463 [details] > [PATCH] Proposed Fix > > View in context: > https://bugs.webkit.org/attachment.cgi?id=264463&action=review > > This is a nice test. Does it cover the JSC change as well? Yes. It was required to get the sourceURL for the InjectedScript and CommandLineAPI injected script. See the ChangeLog for more details. > > LayoutTests/inspector/debugger/scriptParsed.html:86 > > + foundInjectedScriptSourceScript = true; > > I suppose this could be foundXXX = foundXXX || isXXX(), but it doesn't read > any better. I would have done foundXXX |= isXXX() since it isn't that > expensive to recheck. Alternatively, you could run Array.some() with a > lambda for each check. I want this test to ensure we don't see duplicates of the same script. The `foundXXX |= isXXX()` approach wouldn't account for that. I'm sure there are stylistically a bunch of possible solutions, this just seemed the most straight forward. |