mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
bindings: Add test for keywords in dictionaries
This commit is contained in:
parent
203898c941
commit
f893a2eaac
5 changed files with 97 additions and 1 deletions
|
@ -6064,6 +6064,12 @@
|
|||
"url": "/_mozilla/mozilla/bad_cert_detected.html"
|
||||
}
|
||||
],
|
||||
"mozilla/binding_keyword.html": [
|
||||
{
|
||||
"path": "mozilla/binding_keyword.html",
|
||||
"url": "/_mozilla/mozilla/binding_keyword.html"
|
||||
}
|
||||
],
|
||||
"mozilla/blob.html": [
|
||||
{
|
||||
"path": "mozilla/blob.html",
|
||||
|
|
3
tests/wpt/mozilla/meta/mozilla/binding_keyword.html.ini
Normal file
3
tests/wpt/mozilla/meta/mozilla/binding_keyword.html.ini
Normal file
|
@ -0,0 +1,3 @@
|
|||
[binding_keyword.html]
|
||||
type: testharness
|
||||
prefs: [dom.testbinding.enabled:true]
|
16
tests/wpt/mozilla/tests/mozilla/binding_keyword.html
Normal file
16
tests/wpt/mozilla/tests/mozilla/binding_keyword.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for conversions from and to dictionary properties with keywords</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
test(function() {
|
||||
var t = new TestBinding();
|
||||
|
||||
var dict = t.receiveTestDictionaryWithSuccessOnKeyword();
|
||||
assert_equals(dict.type, "success");
|
||||
|
||||
var is_success = t.typeKeywordIsSuccess(dict);
|
||||
assert_true(is_success);
|
||||
}, "Conversion of dictionary elements with rust keywords works")
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue