mirror of
https://github.com/servo/servo.git
synced 2025-08-21 13:25:34 +01:00
Update web-platform-tests to revision dc5cbf088edcdb266541d4e5a76149a2c6e716a0
This commit is contained in:
parent
1d40075f03
commit
079092dfea
2381 changed files with 90360 additions and 17722 deletions
|
@ -22,7 +22,7 @@ Want to contribute?
|
|||
|
||||
1. Fork this repo
|
||||
2. Run <code>gen_tests.rb</code>
|
||||
3. Look into templates/ to see which functions lack tests (also see <a href="../raw/master/methods.txt">methods.txt</a> and <a href="http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/canvas/nsICanvasRenderingContextWebGL.idl">nsICanvasRenderingContextWebGL.idl</a>):
|
||||
3. Look into templates/ to see which functions lack tests (also see <a href="../raw/master/methods.txt">methods.txt</a> and <a href="http://dxr.mozilla.org/mozilla-central/source/dom/interfaces/canvas/nsICanvasRenderingContextWebGL.idl">nsICanvasRenderingContextWebGL.idl</a>):
|
||||
1. copy methodName.html to functions/methodName.html and write tests that test the results of valid inputs.
|
||||
2. copy methodNameBadArgs.html to functions/methodNameBadArgs.html and write tests to assert that invalid inputs throw exceptions.
|
||||
3. If your test causes a segfault, add the following to the top of the script tag: <code>Tests.autorun = false; Tests.message = "Caution: this may crash your browser";</code>
|
||||
|
|
|
@ -49,7 +49,7 @@ def get_tests(base_dir, file_name, tests_list):
|
|||
def process_test(test):
|
||||
(new, new_path) = tempfile.mkstemp()
|
||||
script_tag_found = False
|
||||
with open(test) as test_file:
|
||||
with open(test, "r") as test_file:
|
||||
for line in test_file:
|
||||
if not script_tag_found and "<script" in line:
|
||||
indent = ' ' * line.index('<')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue