pub struct E2eMountOverride { /* private fields */ }Expand description
The E2E mount override for one window: the XML+CSS document the debug
mount op installed, plus a “must be (re-)parsed” flag.
regenerate_layout swaps the parsed document in for the app’s own DOM. The
dirty flag exists because after the FIRST regeneration the mounted DOM is
kept as-is and cloned forward — otherwise every RefreshDom would rebuild it
from the XML and silently discard the DOM-mutation ops (insert_node,
set_node_css_override, …) the test just applied, which makes every damage
assertion see “nothing changed”.
This lives on the window (and is written through
crate::callbacks::CallbackChange::RemountDom) rather than in a process
-global, so two windows cannot share one mounted document and a parallel
headless run cannot have one scenario overwrite another’s DOM.
Implementations§
Source§impl E2eMountOverride
impl E2eMountOverride
Sourcepub fn set(&mut self, xml: Option<String>)
pub fn set(&mut self, xml: Option<String>)
Install (Some) or clear (None) the override; marks it dirty.
Sourcepub const fn is_dirty(&self) -> bool
pub const fn is_dirty(&self) -> bool
Whether a mount / unmount landed since the last Self::take_dirty.
Sourcepub const fn take_dirty(&mut self) -> bool
pub const fn take_dirty(&mut self) -> bool
Take the “must be (re-)parsed” flag, clearing it.
Trait Implementations§
Source§impl Clone for E2eMountOverride
impl Clone for E2eMountOverride
Source§fn clone(&self) -> E2eMountOverride
fn clone(&self) -> E2eMountOverride
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for E2eMountOverride
impl Debug for E2eMountOverride
Source§impl Default for E2eMountOverride
impl Default for E2eMountOverride
Source§fn default() -> E2eMountOverride
fn default() -> E2eMountOverride
Auto Trait Implementations§
impl Freeze for E2eMountOverride
impl RefUnwindSafe for E2eMountOverride
impl Send for E2eMountOverride
impl Sync for E2eMountOverride
impl Unpin for E2eMountOverride
impl UnsafeUnpin for E2eMountOverride
impl UnwindSafe for E2eMountOverride
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more