1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-28 21:32:07 +00:00

LibWeb: Add a simple internals objects only available during testing

This object is available as `window.internals` (or just `internals`) and
is only accessible while running in "test mode".

This first version only has one API: gc(), which triggers a garbage
collection immediately.

In the future, we can add more APIs here to help us test parts of the
engine that are hard or impossible to reach via public web APIs.
This commit is contained in:
Andreas Kling 2023-07-21 11:59:49 +02:00
parent ba236e3f21
commit ec24d7555a
14 changed files with 109 additions and 5 deletions

View file

@ -190,6 +190,8 @@ public:
HighResolutionTime::DOMHighResTimeStamp get_last_activation_timestamp() const { return m_last_activation_timestamp; }
void set_last_activation_timestamp(HighResolutionTime::DOMHighResTimeStamp timestamp) { m_last_activation_timestamp = timestamp; }
static void set_internals_object_exposed(bool);
private:
explicit Window(JS::Realm&);