Summary: | Some WebAudio tests give different output on different machines | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||
Component: | Web Audio | Assignee: | Chris Dumez <cdumez> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | achristensen, calvaris, eric.carlson, ews-watchlist, ggaren, glenn, jer.noble, philipj, pnormand, sergio, vjaquez, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Bug Depends on: | 216425 | ||||||||
Bug Blocks: | 212611 | ||||||||
Attachments: |
|
Description
Chris Dumez
2020-09-10 09:50:45 PDT
Created attachment 408453 [details]
Patch
Comment on attachment 408453 [details]
Patch
Could you pass it through the WebPageCreationParameters instead of making new bundle SPI?
(In reply to Alex Christensen from comment #2) > Comment on attachment 408453 [details] > Patch > > Could you pass it through the WebPageCreationParameters instead of making > new bundle SPI? I was trying to reduce the amount of plumbing necessary. Also, this hardwareSampleRate() is a global static so I did not really want this to be per page. Comment on attachment 408453 [details]
Patch
Why do you pass a WKBundleRef then?
I think we should not be expanding the bundle SPI, even for testing, if we can get away with not expanding it. In this case we can.
(In reply to Alex Christensen from comment #4) > Comment on attachment 408453 [details] > Patch > > Why do you pass a WKBundleRef then? > I think we should not be expanding the bundle SPI, even for testing, if we > can get away with not expanding it. In this case we can. Can you clarify your proposal? You want the SPI to be on the WKWebView even though the sample rate is process-wide? Also, how about when the view swaps process? I would need to add logic to forward the sample rate to the new process? Doing it like you suggest adds more code and complexity. Comment on attachment 408453 [details]
Patch
I think we should make a WKWebViewConfigurationPrivateForTesting.h like we have WKWebViewPrivateForTesting.h, add an override there, then copy it to an Optional on WebPageCreationParameters, then in the WebPage constructor if it's not nullopt we set it globally in that process. When we process swap, a new WebPageCreationParameters is already sent to the new process. It's not perfect, but it's good enough for test-only SPI.
If you really think that's not a good direction and would prefer increasing our dependence on the bundle, r=me
Committed r266842: <https://trac.webkit.org/changeset/266842> I think the best solution would have been to modify the web platform tests to print out a deterministic output. Reverted r266842 and r266883 for reason: Causes some assertions to be hit in debug builds Committed r266895: <https://trac.webkit.org/changeset/266895> Created attachment 408710 [details]
Patch
(In reply to Chris Dumez from comment #11) > Created attachment 408710 [details] > Patch New approach so requesting review again. Comment on attachment 408710 [details]
Patch
For some reason I don't understand, I think this is better than bundle SPI.
I think it would be even better to modify the test to have different output (just PASS/FAIL instead of printing audio sample rates) but this is fine too.
Comment on attachment 408710 [details] Patch Clearing flags on attachment: 408710 Committed r267018: <https://trac.webkit.org/changeset/267018> All reviewed patches have been landed. Closing bug. |