From 233217b89fbf5aa68f01a2c90b35f1aa95785d5d Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 1 Jun 2012 21:26:20 -0400 Subject: [PATCH] Add a simple codegen test for constructors. No review, no bug, DONTBUILD --- dom/bindings/test/TestBindingHeader.h | 10 ++++++++++ dom/bindings/test/TestCodeGen.webidl | 3 +++ 2 files changed, 13 insertions(+) diff --git a/dom/bindings/test/TestBindingHeader.h b/dom/bindings/test/TestBindingHeader.h index 8d33a0cb752..7743c931f35 100644 --- a/dom/bindings/test/TestBindingHeader.h +++ b/dom/bindings/test/TestBindingHeader.h @@ -55,6 +55,16 @@ public: virtual nsISupports* GetParentObject(); // And now our actual WebIDL API + // Constructors + static + already_AddRefed Constructor(nsISupports*, ErrorResult&); + static + already_AddRefed Constructor(nsISupports*, const nsAString&, + ErrorResult&); + static + already_AddRefed Constructor(nsISupports*, uint32_t, + Nullable&, ErrorResult&); + // Integer types int8_t GetReadonlyByte(ErrorResult&); int8_t GetWritableByte(ErrorResult&); diff --git a/dom/bindings/test/TestCodeGen.webidl b/dom/bindings/test/TestCodeGen.webidl index b2fb54d3c7f..ee4807e3631 100644 --- a/dom/bindings/test/TestCodeGen.webidl +++ b/dom/bindings/test/TestCodeGen.webidl @@ -16,6 +16,9 @@ enum TestEnum { callback TestCallback = void(); +[Constructor, + Constructor(DOMString str), + Constructor(unsigned long num, boolean? bool)] interface TestInterface { // Integer types // XXXbz add tests for infallible versions of all the integer stuff