aboutsummaryrefslogtreecommitdiffstats
path: root/components/servo/tests/servo.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/servo/tests/servo.rs')
-rw-r--r--components/servo/tests/servo.rs24
1 files changed, 9 insertions, 15 deletions
diff --git a/components/servo/tests/servo.rs b/components/servo/tests/servo.rs
index 2f71e909bee..6333b0af50a 100644
--- a/components/servo/tests/servo.rs
+++ b/components/servo/tests/servo.rs
@@ -4,7 +4,7 @@
//! Servo API unit tests.
//!
-//! Since all Servo tests must rust serially on the same thread, it is important
+//! Since all Servo tests must run serially on the same thread, it is important
//! that tests never panic. In order to ensure this, use `anyhow::ensure!` instead
//! of `assert!` for test assertions. `ensure!` will produce a `Result::Err` in
//! place of panicking.
@@ -12,21 +12,15 @@
mod common;
use anyhow::ensure;
-use common::*;
-use servo::WebViewBuilder;
+use common::{ServoTest, run_api_tests};
-#[test]
-fn test_simple_servo_is_not_animating_by_default() {
- ServoTest::run(|servo_test| {
- ensure!(!servo_test.servo().animating());
- Ok(())
- });
+fn test_simple_servo_is_not_animating_by_default(
+ servo_test: &ServoTest,
+) -> Result<(), anyhow::Error> {
+ ensure!(!servo_test.servo().animating());
+ Ok(())
}
-#[test]
-fn test_simple_servo_construct_webview() {
- ServoTest::run(|servo_test| {
- WebViewBuilder::new(servo_test.servo()).build();
- Ok(())
- });
+fn main() {
+ run_api_tests!(test_simple_servo_is_not_animating_by_default);
}