Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Feat: recursive dom profiler #96

Merged
merged 46 commits into from
Jun 17, 2024

Conversation

soundofspace
Copy link
Contributor

@soundofspace soundofspace commented Jun 4, 2024

Main focus of this PR is improving profiler and default-browser-emulator:

  • Profiler now recursively goes into objects and not just prototypes alone and stores results in _$otherInvocation keys
  • This is needed for things where this object changes output of of function: eg Bluetooth.getAvailability (illegal invocation) vs navigator.bluetooth.getAvailability (false or true)
    -removeUnsupportedPropertiesFromPolyfill to remove things that emulator currently doesn't support -> these should be added in the future (failed promise results, functions that require arguments)
  • Update instanceChangeExtractor with all new keys now in profiler data
  • Look/store if function result is promise/async and mimic this in emulator
  • Emulator creates single proxy for all things that needs proxies and depending on this changes output

Test fixes:

  • Fix flacky mitm tests because of loading of favicon
  • Navigation test
    • Retry 3 times when not using mitm -> mitm disabled is currently flacky and might break test
    • popupPagePromise before loading so we don't miss event when registering callback too late

Other things done:

  • MacOS use version 13 for github runners (should have better hardware)
  • Make chrome 124 the default
  • Update some docs
  • Fixed chrome regex in bridgeUtils that ignore chrome >= 120
  • Env var to run browserStackLocal and configure accordingly
  • Fix navigator plugin wrong call instead of apply invocation

@soundofspace soundofspace changed the title Feat recursive dom profiler Feat: recursive dom profiler Jun 4, 2024
@soundofspace soundofspace force-pushed the feat--recursive-dom-profiler branch from 94e4eef to 106364d Compare June 4, 2024 13:29
@soundofspace
Copy link
Contributor Author

Are these flacky mitm tests or should these really be investigated, seems kinda consistent?

@blakebyrnes
Copy link
Contributor

tests

Flaky

@blakebyrnes
Copy link
Contributor

New changes look good. Some of these tests in the browser emulator/navigator will need an updated "cut" of the profile data to verify that they can modify objects to match the spec.

@soundofspace soundofspace marked this pull request as ready for review June 13, 2024 18:12
@blakebyrnes
Copy link
Contributor

Fixes #55

@blakebyrnes blakebyrnes merged commit c8d3e37 into ulixee:main Jun 17, 2024
8 of 9 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants