diff --git a/src/test/harness/reftest/reftest.rs b/src/test/harness/reftest/reftest.rs index 6046cd62483..e967b2bea89 100644 --- a/src/test/harness/reftest/reftest.rs +++ b/src/test/harness/reftest/reftest.rs @@ -54,7 +54,7 @@ fn main() { Some(extension) => { if extension.to_ascii_lower().as_slice() == "list" && file.is_file() { let manifest = file.as_str().unwrap(); - let tests = parse_lists(manifest, servo_args, render_mode); + let tests = parse_lists(manifest, servo_args, render_mode, all_tests.len()); println!("\t{} [{} tests]", manifest, tests.len()); all_tests.push_all_move(tests); } @@ -107,9 +107,8 @@ struct TestLine<'a> { file_right: &'a str, } -fn parse_lists(file: &str, servo_args: &[String], render_mode: RenderMode) -> Vec { +fn parse_lists(file: &str, servo_args: &[String], render_mode: RenderMode, id_offset: uint) -> Vec { let mut tests = Vec::new(); - let mut next_id = 0; let file_path = Path::new(file); let contents = File::open_mode(&file_path, io::Open, io::Read) .and_then(|mut f| f.read_to_string()) @@ -163,14 +162,12 @@ fn parse_lists(file: &str, servo_args: &[String], render_mode: RenderMode) -> Ve name: test_line.file_left.to_string().append(" / ").append(test_line.file_right), kind: kind, files: [file_left, file_right], - id: next_id, + id: id_offset + tests.len(), render_mode: render_mode, servo_args: servo_args.iter().map(|x| x.clone()).collect(), flakiness: flakiness, }; - next_id += 1; - tests.push(make_test(reftest)); } tests diff --git a/src/test/ref/csswg/css21/block-formatting-context-height-003-ref.htm b/src/test/ref/csswg/css21/block-formatting-context-height-003-ref.htm new file mode 100644 index 00000000000..7960b59dc86 --- /dev/null +++ b/src/test/ref/csswg/css21/block-formatting-context-height-003-ref.htm @@ -0,0 +1,28 @@ + + + + + + CSS Reftest Reference + + + + + + + + + +

Test passes if there is a black rectangle which is wider than it is tall.

+ +
+ + + \ No newline at end of file diff --git a/src/test/ref/csswg/css21/block-formatting-context-height-003.htm b/src/test/ref/csswg/css21/block-formatting-context-height-003.htm new file mode 100644 index 00000000000..82f66428a42 --- /dev/null +++ b/src/test/ref/csswg/css21/block-formatting-context-height-003.htm @@ -0,0 +1,48 @@ + + + + CSS Test: Block formatting context auto height with floated descendants outside the normal flow and bottom margins + + + + + + + + + + +

Test passes if there is a black rectangle which is wider than it is tall.

+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-001-ref.htm b/src/test/ref/csswg/css21/block-formatting-contexts-001-ref.htm new file mode 100644 index 00000000000..15fb5daede4 --- /dev/null +++ b/src/test/ref/csswg/css21/block-formatting-contexts-001-ref.htm @@ -0,0 +1,34 @@ + + + + + + CSS Reftest Reference + + + + + + + + + +

Test passes if there are 3 lines of "Filler Text".

+ + + + + +
Filler Text
Filler Text
Filler Text
+ + + \ No newline at end of file diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-001.htm b/src/test/ref/csswg/css21/block-formatting-contexts-001.htm new file mode 100644 index 00000000000..dbd92387beb --- /dev/null +++ b/src/test/ref/csswg/css21/block-formatting-contexts-001.htm @@ -0,0 +1,27 @@ + + + + CSS Test: Vertical layout of boxes + + + + + + + + + + +

Test passes if there are 3 lines of "Filler Text".

+
+
Filler Text
+
Filler Text
+
Filler Text
+
+ + \ No newline at end of file diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-003-ref.htm b/src/test/ref/csswg/css21/block-formatting-contexts-003-ref.htm new file mode 100644 index 00000000000..e463a9d0549 --- /dev/null +++ b/src/test/ref/csswg/css21/block-formatting-contexts-003-ref.htm @@ -0,0 +1,59 @@ + + + + + + CSS Reftest Reference + + + + + + + + + +

Test passes if there are 3 lines of "Filler Text" separated by 2 thin black lines.

+ + + + + +
Filler Text
Filler Text
Filler Text
+ + + \ No newline at end of file diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-003.htm b/src/test/ref/csswg/css21/block-formatting-contexts-003.htm new file mode 100644 index 00000000000..b047f6e4bf8 --- /dev/null +++ b/src/test/ref/csswg/css21/block-formatting-contexts-003.htm @@ -0,0 +1,32 @@ + + + + CSS Test: Vertical distance with margins + + + + + + + + + + +

Test passes if there are 3 lines of "Filler Text" separated by 2 thin black lines.

+
+
Filler Text
+
Filler Text
+
Filler Text
+
+ + \ No newline at end of file diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-004-ref.htm b/src/test/ref/csswg/css21/block-formatting-contexts-004-ref.htm new file mode 100644 index 00000000000..4532901043a --- /dev/null +++ b/src/test/ref/csswg/css21/block-formatting-contexts-004-ref.htm @@ -0,0 +1,31 @@ + + + + + + + + CSS Reftest Reference + + + + + + + + + +

Test passes if there is no red.

+ +
+ + + \ No newline at end of file diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-004.htm b/src/test/ref/csswg/css21/block-formatting-contexts-004.htm new file mode 100644 index 00000000000..8fcffba03c6 --- /dev/null +++ b/src/test/ref/csswg/css21/block-formatting-contexts-004.htm @@ -0,0 +1,37 @@ + + + + CSS Test: Block Formatting Contexts: Margin Collapsing + + + + + + + + + + +

Test passes if there is no red.

+
+
XXXXX
+
XXXXX
+
+ + \ No newline at end of file diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-005-ref.htm b/src/test/ref/csswg/css21/block-formatting-contexts-005-ref.htm new file mode 100644 index 00000000000..0c8bf905dd6 --- /dev/null +++ b/src/test/ref/csswg/css21/block-formatting-contexts-005-ref.htm @@ -0,0 +1,31 @@ + + + + + + + + CSS Reftest Reference + + + + + + + + + +

Test passes if there is no space between the blue and orange lines.

+ +
+ + + \ No newline at end of file diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-005.htm b/src/test/ref/csswg/css21/block-formatting-contexts-005.htm new file mode 100644 index 00000000000..2d899e7b848 --- /dev/null +++ b/src/test/ref/csswg/css21/block-formatting-contexts-005.htm @@ -0,0 +1,33 @@ + + + + CSS Test: No padding or margin, left edges touch + + + + + + + + + + +

Test passes if there is no space between the blue and orange lines.

+
+
+
+ + \ No newline at end of file diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-006-ref.htm b/src/test/ref/csswg/css21/block-formatting-contexts-006-ref.htm new file mode 100644 index 00000000000..33d40f54a68 --- /dev/null +++ b/src/test/ref/csswg/css21/block-formatting-contexts-006-ref.htm @@ -0,0 +1,30 @@ + + + + + + CSS Reftest Reference + + + + + + + + + +

Test passes if there is no space between the blue and orange lines.

+ +
+ + + \ No newline at end of file diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-006.htm b/src/test/ref/csswg/css21/block-formatting-contexts-006.htm new file mode 100644 index 00000000000..c110d2bd0da --- /dev/null +++ b/src/test/ref/csswg/css21/block-formatting-contexts-006.htm @@ -0,0 +1,34 @@ + + + + CSS Test: No padding and margin, right edges touch + + + + + + + + + + +

Test passes if there is no space between the blue and orange lines.

+
+
+
+ + \ No newline at end of file diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-008-ref.htm b/src/test/ref/csswg/css21/block-formatting-contexts-008-ref.htm new file mode 100644 index 00000000000..7f0aa355063 --- /dev/null +++ b/src/test/ref/csswg/css21/block-formatting-contexts-008-ref.htm @@ -0,0 +1,28 @@ + + + + + + CSS Reftest Reference + + + + + + + + + +

Test passes if the upper-half of the square is blue.

+ +
Image download support must be enabled
+ + + \ No newline at end of file diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-008.htm b/src/test/ref/csswg/css21/block-formatting-contexts-008.htm new file mode 100644 index 00000000000..e4e0797e012 --- /dev/null +++ b/src/test/ref/csswg/css21/block-formatting-contexts-008.htm @@ -0,0 +1,35 @@ + + + + CSS Test: New block formatting context with floated elements + + + + + + + + + + +

Test passes if the upper-half of the square is blue.

+
+
+
+ + \ No newline at end of file diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-011-ref.htm b/src/test/ref/csswg/css21/block-formatting-contexts-011-ref.htm new file mode 100644 index 00000000000..6f0af4961a3 --- /dev/null +++ b/src/test/ref/csswg/css21/block-formatting-contexts-011-ref.htm @@ -0,0 +1,36 @@ + + + + + + CSS Reftest Reference + + + + + + + + + +

Test passes if the "Filler Text" is below the blue stripe.

+ +
 
+ +
Filler Text
+ + + \ No newline at end of file diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-011.htm b/src/test/ref/csswg/css21/block-formatting-contexts-011.htm new file mode 100644 index 00000000000..fba6a002a9e --- /dev/null +++ b/src/test/ref/csswg/css21/block-formatting-contexts-011.htm @@ -0,0 +1,28 @@ + + + + CSS Test: Table-cell elements establish a new block formatting context + + + + + + + + + + +

Test passes if the "Filler Text" is below the blue stripe.

+
+         + Filler Text +
+ + \ No newline at end of file diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-015-ref.htm b/src/test/ref/csswg/css21/block-formatting-contexts-015-ref.htm new file mode 100644 index 00000000000..c22c64c87ac --- /dev/null +++ b/src/test/ref/csswg/css21/block-formatting-contexts-015-ref.htm @@ -0,0 +1,19 @@ + + + + + + CSS Reftest Reference + + + + + + + +

Test passes if the blue and orange squares have the same size.

+ +
Image download support must be enabledImage download support must be enabled
+ + + \ No newline at end of file diff --git a/src/test/ref/csswg/css21/block-formatting-contexts-015.htm b/src/test/ref/csswg/css21/block-formatting-contexts-015.htm new file mode 100644 index 00000000000..3660bbaec9a --- /dev/null +++ b/src/test/ref/csswg/css21/block-formatting-contexts-015.htm @@ -0,0 +1,49 @@ + + + + CSS Test: Overflow set to 'hidden' establishes a new block formatting context + + + + + + + + + + +

Test passes if the blue and orange squares have the same size.

+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/src/test/ref/csswg/css21/css21.list b/src/test/ref/csswg/css21/css21.list new file mode 100644 index 00000000000..e08ce199afc --- /dev/null +++ b/src/test/ref/csswg/css21/css21.list @@ -0,0 +1,9 @@ +# == block-formatting-context-height-003.htm block-formatting-context-height-003-ref.htm +# == block-formatting-contexts-001.htm block-formatting-contexts-001-ref.htm +# == block-formatting-contexts-003.htm block-formatting-contexts-003-ref.htm +# == block-formatting-contexts-004.htm block-formatting-contexts-004-ref.htm +== block-formatting-contexts-005.htm block-formatting-contexts-005-ref.htm +== block-formatting-contexts-006.htm block-formatting-contexts-006-ref.htm +# == block-formatting-contexts-008.htm block-formatting-contexts-008-ref.htm +# == block-formatting-contexts-011.htm block-formatting-contexts-011-ref.htm +# == block-formatting-contexts-015.htm block-formatting-contexts-015-ref.htm diff --git a/src/test/ref/csswg/css21/support/blue15x15.png b/src/test/ref/csswg/css21/support/blue15x15.png new file mode 100644 index 00000000000..89de32fdb8a Binary files /dev/null and b/src/test/ref/csswg/css21/support/blue15x15.png differ diff --git a/src/test/ref/csswg/css21/support/margin-collapse-2em-space.png b/src/test/ref/csswg/css21/support/margin-collapse-2em-space.png new file mode 100644 index 00000000000..2c381ef4dc8 Binary files /dev/null and b/src/test/ref/csswg/css21/support/margin-collapse-2em-space.png differ diff --git a/src/test/ref/csswg/css21/support/swatch-orange.png b/src/test/ref/csswg/css21/support/swatch-orange.png new file mode 100644 index 00000000000..d3cd498b52b Binary files /dev/null and b/src/test/ref/csswg/css21/support/swatch-orange.png differ