mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:57:46 +00:00
LibWeb: Allow bypassing transient activation checks for tests
We have a 5 second timeout between a user-activated event occurring and an activation-gated API being invoked in order for that API to succeed. This is quite fine in normal circumstances, but the machines used in CI often exceed that limit (we see upwards of 10 seconds passing between generating the user-activated event and the API call running). So instead of generating a user-activated event, add a hook to allow tests to bypass the very next activation check.
This commit is contained in:
parent
4bdcf9a4b7
commit
e52c30cbd5
6 changed files with 22 additions and 14 deletions
|
@ -28,11 +28,14 @@ public:
|
|||
void click(double x, double y);
|
||||
void wheel(double x, double y, double delta_x, double delta_y);
|
||||
|
||||
WebIDL::ExceptionOr<bool> dispatch_user_activated_event(DOM::EventTarget&, DOM::Event& event);
|
||||
bool bypass_next_transient_activation_test() const { return m_bypass_next_transient_activation_test; }
|
||||
void set_bypass_next_transient_activation_test(bool bypass_next_transient_activation_test) { m_bypass_next_transient_activation_test = bypass_next_transient_activation_test; }
|
||||
|
||||
private:
|
||||
explicit Internals(JS::Realm&);
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
|
||||
bool m_bypass_next_transient_activation_test { false };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue