diff options
-rw-r--r-- | python/servo/testing_commands.py | 10 | ||||
-rw-r--r-- | tests/html/close-on-load.html | 5 |
2 files changed, 15 insertions, 0 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index f4b324d4c62..8696f02f8dc 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -971,3 +971,13 @@ testing/web-platform/mozilla/tests for Servo-only tests""" % reference_path) run_globals = {"__file__": run_file} execfile(run_file, run_globals) return run_globals["update_conformance"](version, dest_folder, None, patches_dir) + + @Command('smoketest', + description='Load a simple page in Servo and ensure that it closes properly', + category='testing') + @CommandArgument('params', nargs='...', + help="Command-line arguments to be passed through to Servo") + def smoketest(self, params): + params = params + ['tests/html/close-on-load.html'] + return self.context.commands.dispatch( + 'run', self.context, params=params) diff --git a/tests/html/close-on-load.html b/tests/html/close-on-load.html new file mode 100644 index 00000000000..20b6f658e0d --- /dev/null +++ b/tests/html/close-on-load.html @@ -0,0 +1,5 @@ +<script> + window.onload = function() { + window.close(); + } +</script> |