Auto merge of #12790 - malisas:malisa-bytestring-generator, r=Ms2ger

Update bindings generator to support default ByteString values in a dictionary

<!-- Please describe your changes on the following line: -->
Update bindings generator to support default ByteString values in a dictionary.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12737 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12790)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-08-11 04:36:23 -05:00 committed by GitHub
commit b7facf41cb
4 changed files with 34 additions and 4 deletions

View file

@ -53,6 +53,7 @@ dictionary TestDictionaryDefaults {
float floatValue = 7.0;
unrestricted double UnrestrictedDoubleValue = 7.0;
double doubleValue = 7.0;
ByteString bytestringValue = "foo";
DOMString stringValue = "foo";
USVString usvstringValue = "foo";
TestEnum enumValue = "bar";
@ -71,6 +72,7 @@ dictionary TestDictionaryDefaults {
float? nullableFloatValue = 7.0;
unrestricted double? nullableUnrestrictedDoubleValue = 7.0;
double? nullableDoubleValue = 7.0;
ByteString? nullableBytestringValue = "foo";
DOMString? nullableStringValue = "foo";
USVString? nullableUsvstringValue = "foo";
// TestEnum? nullableEnumValue = "bar";
@ -344,6 +346,7 @@ interface TestBinding {
void passOptionalUnsignedLongWithDefault(optional unsigned long arg = 6);
void passOptionalLongLongWithDefault(optional long long arg = -12);
void passOptionalUnsignedLongLongWithDefault(optional unsigned long long arg = 17);
void passOptionalBytestringWithDefault(optional ByteString arg = "x");
void passOptionalStringWithDefault(optional DOMString arg = "x");
void passOptionalUsvstringWithDefault(optional USVString arg = "x");
void passOptionalEnumWithDefault(optional TestEnum arg = "foo");