From e428c954aa3cd17cb6f622188395c573b3ad7c74 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 29 Aug 2013 01:18:57 -0400 Subject: [PATCH 1/2] Fix contenttest harness build errors. --- src/test/harness/contenttest/contenttest.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/test/harness/contenttest/contenttest.rs b/src/test/harness/contenttest/contenttest.rs index fd765e74126..8ec50200808 100644 --- a/src/test/harness/contenttest/contenttest.rs +++ b/src/test/harness/contenttest/contenttest.rs @@ -54,8 +54,9 @@ fn test_options(config: Config) -> TestOpts { run_ignored: false, run_tests: true, run_benchmarks: false, - save_results: None, - compare_results: None, + ratchet_metrics: None, + ratchet_noise_percent: None, + save_metrics: None, logfile: None } } @@ -84,7 +85,7 @@ fn run_test(file: ~str) { let out = str::from_bytes(res.output); io::print(out); let lines: ~[&str] = out.split_iter('\n').collect(); - for lines.iter().advance |&line| { + for &line in lines.iter() { if line.contains("TEST-UNEXPECTED-FAIL") { fail!(line); } From 2947c0c5bd4aa707623c12c4cdd251bb57bff8ea Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 29 Aug 2013 11:34:41 -0400 Subject: [PATCH 2/2] Add test for proxy dom bindings setter. Fix up prototypes content test to reflect new bindings. Hook up contenttest harness to make check target. --- mk/check.mk | 4 ++-- src/test/html/content/test_prototypes.js | 12 ++++++------ src/test/html/content/test_proxy_setter.html | 9 +++++++++ src/test/html/content/test_proxy_setter.js | 4 ++++ 4 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 src/test/html/content/test_proxy_setter.html create mode 100644 src/test/html/content/test_proxy_setter.js diff --git a/mk/check.mk b/mk/check.mk index ef44f6d86c2..43829a4c951 100644 --- a/mk/check.mk +++ b/mk/check.mk @@ -42,11 +42,11 @@ check-test: @$(call E, " $(DEPS_CHECK_TARGETS_ALL)") .PHONY: check -check: $(DEPS_CHECK_TARGETS_FAST) check-servo tidy +check: $(DEPS_CHECK_TARGETS_FAST) check-servo check-content tidy @$(call E, check: all) .PHONY: check-all -check-all: $(DEPS_CHECK_TARGETS_ALL) check-servo tidy +check-all: $(DEPS_CHECK_TARGETS_ALL) check-servo check-content tidy @$(call E, check: all) .PHONY: check-servo diff --git a/src/test/html/content/test_prototypes.js b/src/test/html/content/test_prototypes.js index 327843439f5..f90170d856d 100644 --- a/src/test/html/content/test_prototypes.js +++ b/src/test/html/content/test_prototypes.js @@ -1,7 +1,7 @@ -is(HTMLImageElement instanceof HTMLElement, true); -is(HTMLElement instanceof Element, true); -is(Element instanceof Node, true); -is(document instanceof Document, true); -is(document.documentElement instanceof HTMLElement, true); -is(document.documentElement instanceof Element, true); +is(window.document.documentElement instanceof Node, true); +is(window.document.documentElement instanceof Element, true); +is(window.document.documentElement instanceof HTMLElement, true); +is(window.document.documentElement instanceof HTMLHtmlElement, true); +is(window.document instanceof Document, true); +is(window.document instanceof HTMLDocument, true); finish(); \ No newline at end of file diff --git a/src/test/html/content/test_proxy_setter.html b/src/test/html/content/test_proxy_setter.html new file mode 100644 index 00000000000..ed096bf5b3c --- /dev/null +++ b/src/test/html/content/test_proxy_setter.html @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/test/html/content/test_proxy_setter.js b/src/test/html/content/test_proxy_setter.js new file mode 100644 index 00000000000..67f4585c15a --- /dev/null +++ b/src/test/html/content/test_proxy_setter.js @@ -0,0 +1,4 @@ +is(window.document.title, ''); +window.document.title = 'foo'; +is(window.document.title, 'foo'); +finish(); \ No newline at end of file