aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_traits/lib.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-07-20 13:38:31 -0500
committerGitHub <noreply@github.com>2016-07-20 13:38:31 -0500
commit14aeccc33ab44d706df86fbce67339218efe710c (patch)
tree623b24534550a56755d440d48f5a89cff6171ded /components/script_traits/lib.rs
parent46db988b906fbec0286fa07387bb34e76a5b3a94 (diff)
parent0b67b218d0c8dc48a5301227802296aff98af6d7 (diff)
downloadservo-14aeccc33ab44d706df86fbce67339218efe710c.tar.gz
servo-14aeccc33ab44d706df86fbce67339218efe710c.zip
Auto merge of #12392 - emilio:test-animations, r=SimonSapin
style: Add support to test animations programatically. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #12120 <!-- Either: --> - [x] There are tests for these changes OR <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> r? @SimonSapin for the style changes, @Ms2ger or @jdm for the dom and test changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12392) <!-- Reviewable:end -->
Diffstat (limited to 'components/script_traits/lib.rs')
-rw-r--r--components/script_traits/lib.rs32
1 files changed, 32 insertions, 0 deletions
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs
index f57ed29f43c..175cc0b82f2 100644
--- a/components/script_traits/lib.rs
+++ b/components/script_traits/lib.rs
@@ -61,6 +61,7 @@ use profile_traits::mem;
use profile_traits::time as profile_time;
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use std::collections::HashMap;
+use std::fmt;
use std::sync::mpsc::{Sender, Receiver};
use style_traits::{PagePx, ViewportPx};
use url::Url;
@@ -207,6 +208,37 @@ pub enum ConstellationControlMsg {
Reload(PipelineId),
}
+impl fmt::Debug for ConstellationControlMsg {
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ use self::ConstellationControlMsg::*;
+ write!(formatter, "ConstellationMsg::{}", match *self {
+ AttachLayout(..) => "AttachLayout",
+ Resize(..) => "Resize",
+ ResizeInactive(..) => "ResizeInactive",
+ ExitPipeline(..) => "ExitPipeline",
+ SendEvent(..) => "SendEvent",
+ Viewport(..) => "Viewport",
+ SetScrollState(..) => "SetScrollState",
+ GetTitle(..) => "GetTitle",
+ Freeze(..) => "Freeze",
+ Thaw(..) => "Thaw",
+ ChangeFrameVisibilityStatus(..) => "ChangeFrameVisibilityStatus",
+ NotifyVisibilityChange(..) => "NotifyVisibilityChange",
+ Navigate(..) => "Navigate",
+ MozBrowserEvent(..) => "MozBrowserEvent",
+ UpdateSubpageId(..) => "UpdateSubpageId",
+ FocusIFrame(..) => "FocusIFrame",
+ WebDriverScriptCommand(..) => "WebDriverScriptCommand",
+ TickAllAnimations(..) => "TickAllAnimations",
+ WebFontLoaded(..) => "WebFontLoaded",
+ DispatchFrameLoadEvent { .. } => "DispatchFrameLoadEvent",
+ FramedContentChanged(..) => "FramedContentChanged",
+ ReportCSSError(..) => "ReportCSSError",
+ Reload(..) => "Reload",
+ })
+ }
+}
+
/// Used to determine if a script has any pending asynchronous activity.
#[derive(Copy, Clone, Debug, PartialEq, Deserialize, Serialize)]
pub enum DocumentState {