diff --git a/components/script/dom/bindings/codegen/Errors.msg b/components/script/dom/bindings/codegen/Errors.msg deleted file mode 100644 index 81d6624cec8..00000000000 --- a/components/script/dom/bindings/codegen/Errors.msg +++ /dev/null @@ -1,30 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -/* - * The format for each error message is: - * - * MSG_DEF(, , ) - * - * where - * - * is a legal C++ identifer that will be used in the source. - * - * is an integer literal specifying the total number of - * replaceable arguments in the following format string. - * - * is a string literal, containing sequences - * {X} where X is an integer representing the argument number that will - * be replaced with a string value when the error is reported. - */ - -MSG_DEF(MSG_INVALID_ENUM_VALUE, 2, "Value '{0}' is not a valid value for enumeration {1}.") -MSG_DEF(MSG_MISSING_ARGUMENTS, 1, "Not enough arguments to {0}.") -MSG_DEF(MSG_NOT_OBJECT, 0, "Value not an object.") -MSG_DEF(MSG_DOES_NOT_IMPLEMENT_INTERFACE, 1, "Value does not implement interface {0}.") -MSG_DEF(MSG_NOT_IN_UNION, 1, "Value could not be converted to any of: {0}.") -MSG_DEF(MSG_ILLEGAL_CONSTRUCTOR, 0, "Illegal constructor.") -MSG_DEF(MSG_NO_PROPERTY_SETTER, 1, "{0} doesn't have an indexed property setter.") -MSG_DEF(MSG_ENFORCE_RANGE_NON_FINITE, 1, "Non-finite value is out of range for {0}.") -MSG_DEF(MSG_ENFORCE_RANGE_OUT_OF_RANGE, 1, "Value is out of range for {0}.") diff --git a/components/script/dom/bindings/codegen/Makefile.in b/components/script/dom/bindings/codegen/Makefile.in deleted file mode 100644 index 5fef1e77218..00000000000 --- a/components/script/dom/bindings/codegen/Makefile.in +++ /dev/null @@ -1,165 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this file, -# You can obtain one at http://mozilla.org/MPL/2.0/. - -DEPTH = @DEPTH@ -topsrcdir = @top_srcdir@ -srcdir = @srcdir@ -VPATH = @srcdir@ -FAIL_ON_WARNINGS := 1 - -MODULE = dom -LIBRARY_NAME = dombindings_s -LIBXUL_LIBRARY = 1 -FORCE_STATIC_LIB = 1 -EXPORT_LIBRARY = 1 - -include $(topsrcdir)/config/config.mk - -# Need this to find all our DOM source files. -include $(topsrcdir)/dom/dom-config.mk - -include $(topsrcdir)/dom/webidl/WebIDL.mk - -binding_include_path := mozilla/dom -all_webidl_files = $(webidl_files) $(generated_webidl_files) -# Set exported_binding_headers before adding the test IDL to the mix -exported_binding_headers := $(subst .webidl,Binding.h,$(all_webidl_files)) -# Set linked_binding_cpp_files before adding the test IDL to the mix -linked_binding_cpp_files := $(subst .webidl,Binding.cpp,$(all_webidl_files)) - -all_webidl_files += $(test_webidl_files) - -binding_header_files := $(subst .webidl,Binding.h,$(all_webidl_files)) -binding_cpp_files := $(subst .webidl,Binding.cpp,$(all_webidl_files)) - -globalgen_targets := \ - PrototypeList.h \ - RegisterBindings.h \ - RegisterBindings.cpp \ - UnionTypes.h \ - UnionConversions.h \ - $(NULL) - -CPPSRCS = \ - $(linked_binding_cpp_files) \ - $(filter %.cpp, $(globalgen_targets)) \ - BindingUtils.cpp \ - DOMJSProxyHandler.cpp \ - $(NULL) - -EXPORTS_NAMESPACES = $(binding_include_path) mozilla - -EXPORTS_mozilla = \ - ErrorResult.h \ - $(NULL) - -EXPORTS_$(binding_include_path) = \ - BindingUtils.h \ - DOMJSClass.h \ - DOMJSProxyHandler.h \ - Errors.msg \ - Nullable.h \ - PrimitiveConversions.h \ - PrototypeList.h \ - RegisterBindings.h \ - TypedArray.h \ - UnionConversions.h \ - UnionTypes.h \ - $(exported_binding_headers) \ - $(NULL) - -LOCAL_INCLUDES += -I$(topsrcdir)/js/xpconnect/src \ - -I$(topsrcdir)/js/xpconnect/wrappers \ - -I$(topsrcdir)/content/canvas/src \ - -I$(topsrcdir)/content/html/content/src - -include $(topsrcdir)/config/rules.mk - -# If you change bindinggen_dependencies here, change it in -# dom/bindings/test/Makefile.in too. -bindinggen_dependencies := \ - BindingGen.py \ - Bindings.conf \ - Configuration.py \ - Codegen.py \ - parser/WebIDL.py \ - ParserResults.pkl \ - $(GLOBAL_DEPS) \ - $(NULL) - -CSS2Properties.webidl: $(topsrcdir)/layout/style/nsCSSPropList.h \ - $(topsrcdir)/layout/style/nsCSSPropAliasList.h \ - $(webidl_base)/CSS2Properties.webidl.in \ - $(webidl_base)/CSS2PropertiesProps.h \ - $(srcdir)/GenerateCSS2PropertiesWebIDL.py \ - $(GLOBAL_DEPS) - $(CPP) $(DEFINES) $(ACDEFINES) -I$(topsrcdir)/layout/style $(webidl_base)/CSS2PropertiesProps.h | \ - $(PYTHON) \ - $(srcdir)/GenerateCSS2PropertiesWebIDL.py $(webidl_base)/CSS2Properties.webidl.in > CSS2Properties.webidl - -$(webidl_files): %: $(webidl_base)/% - $(INSTALL) $(IFLAGS1) $(webidl_base)/$* . - -$(test_webidl_files): %: $(srcdir)/test/% - $(INSTALL) $(IFLAGS1) $(srcdir)/test/$* . - -$(binding_header_files): %Binding.h: $(bindinggen_dependencies) \ - %.webidl \ - $(NULL) - $(PYTHON) $(topsrcdir)/config/pythonpath.py \ - $(PLY_INCLUDE) -I$(srcdir)/parser \ - $(srcdir)/BindingGen.py header \ - $(srcdir)/Bindings.conf $*Binding \ - $*.webidl - -$(binding_cpp_files): %Binding.cpp: $(bindinggen_dependencies) \ - %.webidl \ - $(NULL) - $(PYTHON) $(topsrcdir)/config/pythonpath.py \ - $(PLY_INCLUDE) -I$(srcdir)/parser \ - $(srcdir)/BindingGen.py cpp \ - $(srcdir)/Bindings.conf $*Binding \ - $*.webidl - -$(globalgen_targets): ParserResults.pkl - -CACHE_DIR = _cache - -globalgen_dependencies := \ - GlobalGen.py \ - Bindings.conf \ - Configuration.py \ - Codegen.py \ - parser/WebIDL.py \ - $(CACHE_DIR)/.done \ - $(GLOBAL_DEPS) \ - $(NULL) - -$(CACHE_DIR)/.done: - $(MKDIR) -p $(CACHE_DIR) - @$(TOUCH) $@ - -ParserResults.pkl: $(globalgen_dependencies) \ - $(all_webidl_files) - $(PYTHON) $(topsrcdir)/config/pythonpath.py \ - $(PLY_INCLUDE) -I$(srcdir)/parser \ - $(srcdir)/GlobalGen.py $(srcdir)/Bindings.conf . \ - --cachedir=$(CACHE_DIR) \ - $(all_webidl_files) - -GARBAGE += \ - $(binding_header_files) \ - $(binding_cpp_files) \ - $(all_webidl_files) \ - $(globalgen_targets) \ - ParserResults.pkl \ - webidlyacc.py \ - parser.out \ - $(NULL) - -# Make sure all binding header files are created during the export stage, so we -# don't have issues with .cpp files being compiled before we've generated the -# headers they depend on. This is really only needed for the test files, since -# the non-test headers are all exported above anyway. -export:: $(binding_header_files) diff --git a/components/script/dom/bindings/codegen/crashtests/769464.html b/components/script/dom/bindings/codegen/crashtests/769464.html deleted file mode 100644 index 84d6dbc08b4..00000000000 --- a/components/script/dom/bindings/codegen/crashtests/769464.html +++ /dev/null @@ -1,11 +0,0 @@ - - diff --git a/components/script/dom/bindings/codegen/crashtests/crashtests.list b/components/script/dom/bindings/codegen/crashtests/crashtests.list deleted file mode 100644 index cb954bd91fc..00000000000 --- a/components/script/dom/bindings/codegen/crashtests/crashtests.list +++ /dev/null @@ -1 +0,0 @@ -asserts-if(cocoaWidget,0-1) load 769464.html diff --git a/components/script/dom/bindings/codegen/stubgenerator/Skeleton.cpp b/components/script/dom/bindings/codegen/stubgenerator/Skeleton.cpp deleted file mode 100644 index dfa17d23400..00000000000 --- a/components/script/dom/bindings/codegen/stubgenerator/Skeleton.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim:set ts=2 sw=2 sts=2 et cindent: */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "Skeleton.h" -#include "mozilla/dom/SkeletonBinding.h" -#include "nsContentUtils.h" - -namespace mozilla { -namespace dom { - -NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(Skeleton) -NS_IMPL_CYCLE_COLLECTING_ADDREF(Skeleton) -NS_IMPL_CYCLE_COLLECTING_RELEASE(Skeleton) -NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(Skeleton) - NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY - NS_INTERFACE_MAP_ENTRY(nsISupports) -NS_INTERFACE_MAP_END - -Skeleton::Skeleton() -{ - SetIsDOMBinding(); -} - -Skeleton::~Skeleton() -{ -} - -JSObject* -Skeleton::WrapObject(JSContext* aCx, JSObject* aScope, - bool* aTriedToWrap) -{ - return SkeletonBinding::Wrap(aCx, aScope, this, aTriedToWrap); -} - -} -} - diff --git a/components/script/dom/bindings/codegen/stubgenerator/Skeleton.h b/components/script/dom/bindings/codegen/stubgenerator/Skeleton.h deleted file mode 100644 index 286cff9af4a..00000000000 --- a/components/script/dom/bindings/codegen/stubgenerator/Skeleton.h +++ /dev/null @@ -1,40 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim:set ts=2 sw=2 sts=2 et cindent: */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#pragma once - -#include "nsWrapperCache.h" -#include "nsCycleCollectionParticipant.h" -#include "mozilla/Attributes.h" - -struct JSContext; - -namespace mozilla { -namespace dom { - -class Skeleton MOZ_FINAL : public nsISupports, - public nsWrapperCache -{ -public: - Skeleton(); - ~Skeleton(); - - NS_DECL_CYCLE_COLLECTING_ISUPPORTS - NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Skeleton) - - void* GetParentObject() const - { - // TODO: return something sensible here, and change the return type - return somethingSensible; - } - - virtual JSObject* WrapObject(JSContext* aCx, JSObject* aScope, - bool* aTriedToWrap); -}; - -} -} - diff --git a/components/script/dom/bindings/codegen/stubgenerator/generate.sh b/components/script/dom/bindings/codegen/stubgenerator/generate.sh deleted file mode 100644 index 52577f6f42f..00000000000 --- a/components/script/dom/bindings/codegen/stubgenerator/generate.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# This script creates a skeleton implementation for a C++ class which -# implements a Web IDL interface. - -# This script is released into the public domain. - -if [ -z "$1" ]; then - echo usage: ./generate.sh ClassName - exit 1 -fi - -expression="s/Skeleton/$1/g" - -sed "$expression" < Skeleton.h > "$1.h" -sed "$expression" < Skeleton.cpp > "$1.cpp" - diff --git a/components/script/dom/bindings/codegen/test/Makefile.in b/components/script/dom/bindings/codegen/test/Makefile.in deleted file mode 100644 index d8104db5ffd..00000000000 --- a/components/script/dom/bindings/codegen/test/Makefile.in +++ /dev/null @@ -1,87 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this file, -# You can obtain one at http://mozilla.org/MPL/2.0/. - -DEPTH = @DEPTH@ -topsrcdir = @top_srcdir@ -srcdir = @srcdir@ -VPATH = @srcdir@ -relativesrcdir = @relativesrcdir@ - -MODULE = dom -LIBRARY_NAME = dombindings_test_s -LIBXUL_LIBRARY = 1 -FORCE_STATIC_LIB = 1 -# Do NOT export this library. We don't actually want our test code -# being added to libxul or anything. - -include $(DEPTH)/config/autoconf.mk - -# Need this to find all our DOM source files. -include $(topsrcdir)/dom/dom-config.mk - -# And need this for $(test_webidl_files) -include $(topsrcdir)/dom/webidl/WebIDL.mk - -# But the webidl actually lives in our parent dir -test_webidl_files := $(addprefix ../,$(test_webidl_files)) - -CPPSRCS := $(subst .webidl,Binding.cpp,$(test_webidl_files)) - -LOCAL_INCLUDES += \ - -I$(topsrcdir)/js/xpconnect/src \ - -I$(topsrcdir)/js/xpconnect/wrappers \ - -I$(topsrcdir)/dom/bindings \ - $(NULL) - - -# If you change bindinggen_dependencies here, change it in -# dom/bindings/Makefile.in too. But note that we include ../Makefile -# here manually, since $(GLOBAL_DEPS) won't cover it. -bindinggen_dependencies := \ - ../BindingGen.py \ - ../Bindings.conf \ - ../Configuration.py \ - ../Codegen.py \ - ../parser/WebIDL.py \ - ../ParserResults.pkl \ - ../Makefile \ - $(GLOBAL_DEPS) \ - $(NULL) - -MOCHITEST_FILES := \ - test_bug773326.html \ - test_enums.html \ - test_integers.html \ - test_interfaceToString.html \ - test_lookupGetter.html \ - test_InstanceOf.html \ - test_traceProtos.html \ - test_forOf.html \ - forOf_iframe.html \ - test_sequence_wrapping.html \ - file_bug775543.html \ - test_bug788369.html \ - $(NULL) - -MOCHITEST_CHROME_FILES = \ - test_bug775543.html \ - $(NULL) - -# Include rules.mk before any of our targets so our first target is coming from -# rules.mk and running make with no target in this dir does the right thing. -include $(topsrcdir)/config/rules.mk - -$(CPPSRCS): ../%Binding.cpp: $(bindinggen_dependencies) \ - ../%.webidl \ - $(NULL) - $(MAKE) -C .. $*Binding.h - $(MAKE) -C .. $*Binding.cpp - -check:: - $(PYTHON) $(topsrcdir)/config/pythonpath.py \ - $(PLY_INCLUDE) $(srcdir)/../parser/runtests.py - -check-interactive: - $(PYTHON) $(topsrcdir)/config/pythonpath.py \ - $(PLY_INCLUDE) $(srcdir)/../parser/runtests.py -q diff --git a/components/script/dom/bindings/codegen/test/TestBindingHeader.h b/components/script/dom/bindings/codegen/test/TestBindingHeader.h deleted file mode 100644 index 20e01813119..00000000000 --- a/components/script/dom/bindings/codegen/test/TestBindingHeader.h +++ /dev/null @@ -1,653 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#ifndef TestBindingHeader_h -#define TestBindingHeader_h - -#include "nsWrapperCache.h" -#include "mozilla/ErrorResult.h" -#include "mozilla/dom/BindingUtils.h" -#include "mozilla/dom/TypedArray.h" -#include "nsCOMPtr.h" -// We don't export TestCodeGenBinding.h, but it's right in our parent dir. -#include "../TestCodeGenBinding.h" -#include "mozilla/dom/UnionTypes.h" - -namespace mozilla { -namespace dom { - -// IID for the TestNonCastableInterface -#define NS_TEST_NONCASTABLE_INTERFACE_IID \ -{ 0x7c9f8ee2, 0xc9bf, 0x46ca, \ - { 0xa0, 0xa9, 0x03, 0xa8, 0xd6, 0x30, 0x0e, 0xde } } - -class TestNonCastableInterface : public nsISupports, - public nsWrapperCache -{ -public: - NS_DECLARE_STATIC_IID_ACCESSOR(NS_TEST_NONCASTABLE_INTERFACE_IID) - NS_DECL_ISUPPORTS - - // We need a GetParentObject to make binding codegen happy - virtual nsISupports* GetParentObject(); -}; - -// IID for the IndirectlyImplementedInterface -#define NS_INDIRECTLY_IMPLEMENTED_INTERFACE_IID \ -{ 0xfed55b69, 0x7012, 0x4849, \ - { 0xaf, 0x56, 0x4b, 0xa9, 0xee, 0x41, 0x30, 0x89 } } - -class IndirectlyImplementedInterface : public nsISupports, - public nsWrapperCache -{ -public: - NS_DECLARE_STATIC_IID_ACCESSOR(NS_INDIRECTLY_IMPLEMENTED_INTERFACE_IID) - NS_DECL_ISUPPORTS - - // We need a GetParentObject to make binding codegen happy - virtual nsISupports* GetParentObject(); - - bool IndirectlyImplementedProperty(); - void IndirectlyImplementedProperty(bool); - void IndirectlyImplementedMethod(); -}; - -// IID for the TestExternalInterface -#define NS_TEST_EXTERNAL_INTERFACE_IID \ -{ 0xd5ba0c99, 0x9b1d, 0x4e71, \ - { 0x8a, 0x94, 0x56, 0x38, 0x6c, 0xa3, 0xda, 0x3d } } -class TestExternalInterface : public nsISupports -{ -public: - NS_DECLARE_STATIC_IID_ACCESSOR(NS_TEST_EXTERNAL_INTERFACE_IID) - NS_DECL_ISUPPORTS -}; - -// IID for the TestCallbackInterface -#define NS_TEST_CALLBACK_INTERFACE_IID \ -{ 0xbf711ba4, 0xc8f6, 0x46cf, \ - { 0xba, 0x5b, 0xaa, 0xe2, 0x78, 0x18, 0xe6, 0x4a } } -class TestCallbackInterface : public nsISupports -{ -public: - NS_DECLARE_STATIC_IID_ACCESSOR(NS_TEST_CALLBACK_INTERFACE_IID) - NS_DECL_ISUPPORTS -}; - -class TestNonWrapperCacheInterface : public nsISupports -{ -public: - NS_DECL_ISUPPORTS - - virtual JSObject* WrapObject(JSContext* cx, JSObject* scope); -}; - -class OnlyForUseInConstructor : public nsISupports, - public nsWrapperCache -{ -public: - NS_DECL_ISUPPORTS - // We need a GetParentObject to make binding codegen happy - virtual nsISupports* GetParentObject(); -}; - -class TestInterface : public nsISupports, - public nsWrapperCache -{ -public: - NS_DECL_ISUPPORTS - - // We need a GetParentObject to make binding codegen happy - 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&); - static - already_AddRefed Constructor(nsISupports*, TestInterface*, - ErrorResult&); - static - already_AddRefed Constructor(nsISupports*, - TestNonCastableInterface&, - ErrorResult&); - /* static - already_AddRefed Constructor(nsISupports*, - uint32_t, uint32_t, - const TestInterfaceOrOnlyForUseInConstructor&, - ErrorResult&); - */ - - // Integer types - int8_t ReadonlyByte(); - int8_t WritableByte(); - void SetWritableByte(int8_t); - void PassByte(int8_t); - int8_t ReceiveByte(); - void PassOptionalByte(const Optional&); - void PassOptionalByteWithDefault(int8_t); - void PassNullableByte(Nullable&); - void PassOptionalNullableByte(const Optional< Nullable >&); - - int16_t ReadonlyShort(); - int16_t WritableShort(); - void SetWritableShort(int16_t); - void PassShort(int16_t); - int16_t ReceiveShort(); - void PassOptionalShort(const Optional&); - void PassOptionalShortWithDefault(int16_t); - - int32_t ReadonlyLong(); - int32_t WritableLong(); - void SetWritableLong(int32_t); - void PassLong(int32_t); - int16_t ReceiveLong(); - void PassOptionalLong(const Optional&); - void PassOptionalLongWithDefault(int32_t); - - int64_t ReadonlyLongLong(); - int64_t WritableLongLong(); - void SetWritableLongLong(int64_t); - void PassLongLong(int64_t); - int64_t ReceiveLongLong(); - void PassOptionalLongLong(const Optional&); - void PassOptionalLongLongWithDefault(int64_t); - - uint8_t ReadonlyOctet(); - uint8_t WritableOctet(); - void SetWritableOctet(uint8_t); - void PassOctet(uint8_t); - uint8_t ReceiveOctet(); - void PassOptionalOctet(const Optional&); - void PassOptionalOctetWithDefault(uint8_t); - - uint16_t ReadonlyUnsignedShort(); - uint16_t WritableUnsignedShort(); - void SetWritableUnsignedShort(uint16_t); - void PassUnsignedShort(uint16_t); - uint16_t ReceiveUnsignedShort(); - void PassOptionalUnsignedShort(const Optional&); - void PassOptionalUnsignedShortWithDefault(uint16_t); - - uint32_t ReadonlyUnsignedLong(); - uint32_t WritableUnsignedLong(); - void SetWritableUnsignedLong(uint32_t); - void PassUnsignedLong(uint32_t); - uint32_t ReceiveUnsignedLong(); - void PassOptionalUnsignedLong(const Optional&); - void PassOptionalUnsignedLongWithDefault(uint32_t); - - uint64_t ReadonlyUnsignedLongLong(); - uint64_t WritableUnsignedLongLong(); - void SetWritableUnsignedLongLong(uint64_t); - void PassUnsignedLongLong(uint64_t); - uint64_t ReceiveUnsignedLongLong(); - void PassOptionalUnsignedLongLong(const Optional&); - void PassOptionalUnsignedLongLongWithDefault(uint64_t); - - // Interface types - already_AddRefed ReceiveSelf(); - already_AddRefed ReceiveNullableSelf(); - TestInterface* ReceiveWeakSelf(); - TestInterface* ReceiveWeakNullableSelf(); - void PassSelf(TestInterface&); - void PassSelf2(NonNull&); - void PassNullableSelf(TestInterface*); - already_AddRefed NonNullSelf(); - void SetNonNullSelf(TestInterface&); - already_AddRefed GetNullableSelf(); - void SetNullableSelf(TestInterface*); - void PassOptionalSelf(const Optional &); - void PassOptionalNonNullSelf(const Optional >&); - void PassOptionalSelfWithDefault(TestInterface*); - - already_AddRefed ReceiveNonWrapperCacheInterface(); - already_AddRefed ReceiveNullableNonWrapperCacheInterface(); - void ReceiveNonWrapperCacheInterfaceSequence(nsTArray >&); - void ReceiveNullableNonWrapperCacheInterfaceSequence(nsTArray >&); - void ReceiveNonWrapperCacheInterfaceNullableSequence(Nullable > >&); - void ReceiveNullableNonWrapperCacheInterfaceNullableSequence( - Nullable > >&); - - already_AddRefed ReceiveOther(); - already_AddRefed ReceiveNullableOther(); - TestNonCastableInterface* ReceiveWeakOther(); - TestNonCastableInterface* ReceiveWeakNullableOther(); - void PassOther(TestNonCastableInterface&); - void PassOther2(NonNull&); - void PassNullableOther(TestNonCastableInterface*); - already_AddRefed NonNullOther(); - void SetNonNullOther(TestNonCastableInterface&); - already_AddRefed GetNullableOther(); - void SetNullableOther(TestNonCastableInterface*); - void PassOptionalOther(const Optional&); - void PassOptionalNonNullOther(const Optional >&); - void PassOptionalOtherWithDefault(TestNonCastableInterface*); - - already_AddRefed ReceiveExternal(); - already_AddRefed ReceiveNullableExternal(); - TestExternalInterface* ReceiveWeakExternal(); - TestExternalInterface* ReceiveWeakNullableExternal(); - void PassExternal(TestExternalInterface*); - void PassExternal2(TestExternalInterface*); - void PassNullableExternal(TestExternalInterface*); - already_AddRefed NonNullExternal(); - void SetNonNullExternal(TestExternalInterface*); - already_AddRefed GetNullableExternal(); - void SetNullableExternal(TestExternalInterface*); - void PassOptionalExternal(const Optional&); - void PassOptionalNonNullExternal(const Optional&); - void PassOptionalExternalWithDefault(TestExternalInterface*); - - already_AddRefed ReceiveCallbackInterface(); - already_AddRefed ReceiveNullableCallbackInterface(); - TestCallbackInterface* ReceiveWeakCallbackInterface(); - TestCallbackInterface* ReceiveWeakNullableCallbackInterface(); - void PassCallbackInterface(TestCallbackInterface&); - void PassCallbackInterface2(OwningNonNull); - void PassNullableCallbackInterface(TestCallbackInterface*); - already_AddRefed NonNullCallbackInterface(); - void SetNonNullCallbackInterface(TestCallbackInterface&); - already_AddRefed GetNullableCallbackInterface(); - void SetNullableCallbackInterface(TestCallbackInterface*); - void PassOptionalCallbackInterface(const Optional >&); - void PassOptionalNonNullCallbackInterface(const Optional >&); - void PassOptionalCallbackInterfaceWithDefault(TestCallbackInterface*); - - already_AddRefed ReceiveConsequentialInterface(); - void PassConsequentialInterface(IndirectlyImplementedInterface&); - - // Sequence types - void ReceiveSequence(nsTArray&); - void ReceiveNullableSequence(Nullable< nsTArray >&); - void ReceiveSequenceOfNullableInts(nsTArray< Nullable >&); - void ReceiveNullableSequenceOfNullableInts(Nullable< nsTArray< Nullable > >&); - void PassSequence(const Sequence &); - void PassNullableSequence(const Nullable< Sequence >&); - void PassSequenceOfNullableInts(const Sequence >&); - void PassOptionalSequenceOfNullableInts(const Optional > > &); - void PassOptionalNullableSequenceOfNullableInts(const Optional > > > &); - void ReceiveCastableObjectSequence(nsTArray< nsRefPtr > &); - void ReceiveNullableCastableObjectSequence(nsTArray< nsRefPtr > &); - void ReceiveCastableObjectNullableSequence(Nullable< nsTArray< nsRefPtr > >&); - void ReceiveNullableCastableObjectNullableSequence(Nullable< nsTArray< nsRefPtr > >&); - void ReceiveWeakCastableObjectSequence(nsTArray &); - void ReceiveWeakNullableCastableObjectSequence(nsTArray &); - void ReceiveWeakCastableObjectNullableSequence(Nullable< nsTArray >&); - void ReceiveWeakNullableCastableObjectNullableSequence(Nullable< nsTArray >&); - void PassCastableObjectSequence(const Sequence< OwningNonNull >&); - void PassNullableCastableObjectSequence(const Sequence< nsRefPtr > &); - void PassCastableObjectNullableSequence(const Nullable< Sequence< OwningNonNull > >&); - void PassNullableCastableObjectNullableSequence(const Nullable< Sequence< nsRefPtr > >&); - void PassOptionalSequence(const Optional >&); - void PassOptionalNullableSequence(const Optional > >&); - void PassOptionalNullableSequenceWithDefaultValue(const Nullable< Sequence >&); - void PassOptionalObjectSequence(const Optional > >&); - - void ReceiveStringSequence(nsTArray&); - void PassStringSequence(const Sequence&); - - void ReceiveAnySequence(JSContext*, nsTArray&); - void ReceiveNullableAnySequence(JSContext*, Nullable >); - - // Typed array types - void PassArrayBuffer(ArrayBuffer&); - void PassNullableArrayBuffer(ArrayBuffer*); - void PassOptionalArrayBuffer(const Optional&); - void PassOptionalNullableArrayBuffer(const Optional&); - void PassOptionalNullableArrayBufferWithDefaultValue(ArrayBuffer*); - void PassArrayBufferView(ArrayBufferView&); - void PassInt8Array(Int8Array&); - void PassInt16Array(Int16Array&); - void PassInt32Array(Int32Array&); - void PassUint8Array(Uint8Array&); - void PassUint16Array(Uint16Array&); - void PassUint32Array(Uint32Array&); - void PassUint8ClampedArray(Uint8ClampedArray&); - void PassFloat32Array(Float32Array&); - void PassFloat64Array(Float64Array&); - JSObject* ReceiveUint8Array(JSContext*); - - // String types - void PassString(const nsAString&); - void PassNullableString(const nsAString&); - void PassOptionalString(const Optional&); - void PassOptionalStringWithDefaultValue(const nsAString&); - void PassOptionalNullableString(const Optional&); - void PassOptionalNullableStringWithDefaultValue(const nsAString&); - - // Enumarated types - void PassEnum(TestEnum); - void PassOptionalEnum(const Optional&); - void PassEnumWithDefault(TestEnum); - TestEnum ReceiveEnum(); - TestEnum EnumAttribute(); - TestEnum ReadonlyEnumAttribute(); - void SetEnumAttribute(TestEnum); - - // Callback types - void PassCallback(JSContext*, JSObject*); - void PassNullableCallback(JSContext*, JSObject*); - void PassOptionalCallback(JSContext*, const Optional&); - void PassOptionalNullableCallback(JSContext*, const Optional&); - void PassOptionalNullableCallbackWithDefaultValue(JSContext*, JSObject*); - JSObject* ReceiveCallback(JSContext*); - JSObject* ReceiveNullableCallback(JSContext*); - - // Any types - void PassAny(JSContext*, JS::Value); - void PassOptionalAny(JSContext*, const Optional&); - void PassAnyDefaultNull(JSContext*, JS::Value); - JS::Value ReceiveAny(JSContext*); - - // object types - void PassObject(JSContext*, JSObject&); - void PassNullableObject(JSContext*, JSObject*); - void PassOptionalObject(JSContext*, const Optional >&); - void PassOptionalNullableObject(JSContext*, const Optional&); - void PassOptionalNullableObjectWithDefaultValue(JSContext*, JSObject*); - JSObject* ReceiveObject(JSContext*); - JSObject* ReceiveNullableObject(JSContext*); - - // Union types - void PassUnion(JSContext*, const ObjectOrLong& arg); - void PassUnionWithNullable(JSContext*, const ObjectOrNullOrLong& arg) - { - ObjectOrLong returnValue; - if (arg.IsNull()) { - } else if (arg.IsObject()) { - JSObject& obj = (JSObject&)arg.GetAsObject(); - JS_GetClass(&obj); - //returnValue.SetAsObject(&obj); - } else { - int32_t i = arg.GetAsLong(); - i += 1; - } - } - void PassNullableUnion(JSContext*, const Nullable&); - void PassOptionalUnion(JSContext*, const Optional&); - void PassOptionalNullableUnion(JSContext*, const Optional >&); - void PassOptionalNullableUnionWithDefaultValue(JSContext*, const Nullable&); - //void PassUnionWithInterfaces(const TestInterfaceOrTestExternalInterface& arg); - //void PassUnionWithInterfacesAndNullable(const TestInterfaceOrNullOrTestExternalInterface& arg); - void PassUnionWithArrayBuffer(const ArrayBufferOrLong&); - void PassUnionWithString(JSContext*, const StringOrObject&); - //void PassUnionWithEnum(JSContext*, const TestEnumOrObject&); - void PassUnionWithCallback(JSContext*, const TestCallbackOrLong&); - void PassUnionWithObject(JSContext*, const ObjectOrLong&); - - // binaryNames tests - void MethodRenamedTo(); - void MethodRenamedTo(int8_t); - int8_t AttributeGetterRenamedTo(); - int8_t AttributeRenamedTo(); - void SetAttributeRenamedTo(int8_t); - - // Dictionary tests - void PassDictionary(const Dict&); - void PassOtherDictionary(const GrandparentDict&); - void PassSequenceOfDictionaries(const Sequence&); - void PassDictionaryOrLong(const Dict&); - void PassDictionaryOrLong(int32_t); - void PassDictContainingDict(const DictContainingDict&); - void PassDictContainingSequence(const DictContainingSequence&); - - // Typedefs - void ExerciseTypedefInterfaces1(TestInterface&); - already_AddRefed ExerciseTypedefInterfaces2(TestInterface*); - void ExerciseTypedefInterfaces3(TestInterface&); - - // Miscellania - int32_t AttrWithLenientThis(); - void SetAttrWithLenientThis(int32_t); - - // Methods and properties imported via "implements" - bool ImplementedProperty(); - void SetImplementedProperty(bool); - void ImplementedMethod(); - bool ImplementedParentProperty(); - void SetImplementedParentProperty(bool); - void ImplementedParentMethod(); - bool IndirectlyImplementedProperty(); - void SetIndirectlyImplementedProperty(bool); - void IndirectlyImplementedMethod(); - uint32_t DiamondImplementedProperty(); - - // Test EnforceRange/Clamp - void DontEnforceRangeOrClamp(int8_t); - void DoEnforceRange(int8_t); - void DoClamp(int8_t); - -private: - // We add signatures here that _could_ start matching if the codegen - // got data types wrong. That way if it ever does we'll have a call - // to these private deleted methods and compilation will fail. - void SetReadonlyByte(int8_t) MOZ_DELETE; - template - void SetWritableByte(T) MOZ_DELETE; - template - void PassByte(T) MOZ_DELETE; - template - void PassOptionalByte(const Optional&) MOZ_DELETE; - template - void PassOptionalByteWithDefault(T) MOZ_DELETE; - - void SetReadonlyShort(int16_t) MOZ_DELETE; - template - void SetWritableShort(T) MOZ_DELETE; - template - void PassShort(T) MOZ_DELETE; - template - void PassOptionalShort(const Optional&) MOZ_DELETE; - template - void PassOptionalShortWithDefault(T) MOZ_DELETE; - - void SetReadonlyLong(int32_t) MOZ_DELETE; - template - void SetWritableLong(T) MOZ_DELETE; - template - void PassLong(T) MOZ_DELETE; - template - void PassOptionalLong(const Optional&) MOZ_DELETE; - template - void PassOptionalLongWithDefault(T) MOZ_DELETE; - - void SetReadonlyLongLong(int64_t) MOZ_DELETE; - template - void SetWritableLongLong(T) MOZ_DELETE; - template - void PassLongLong(T) MOZ_DELETE; - template - void PassOptionalLongLong(const Optional&) MOZ_DELETE; - template - void PassOptionalLongLongWithDefault(T) MOZ_DELETE; - - void SetReadonlyOctet(uint8_t) MOZ_DELETE; - template - void SetWritableOctet(T) MOZ_DELETE; - template - void PassOctet(T) MOZ_DELETE; - template - void PassOptionalOctet(const Optional&) MOZ_DELETE; - template - void PassOptionalOctetWithDefault(T) MOZ_DELETE; - - void SetReadonlyUnsignedShort(uint16_t) MOZ_DELETE; - template - void SetWritableUnsignedShort(T) MOZ_DELETE; - template - void PassUnsignedShort(T) MOZ_DELETE; - template - void PassOptionalUnsignedShort(const Optional&) MOZ_DELETE; - template - void PassOptionalUnsignedShortWithDefault(T) MOZ_DELETE; - - void SetReadonlyUnsignedLong(uint32_t) MOZ_DELETE; - template - void SetWritableUnsignedLong(T) MOZ_DELETE; - template - void PassUnsignedLong(T) MOZ_DELETE; - template - void PassOptionalUnsignedLong(const Optional&) MOZ_DELETE; - template - void PassOptionalUnsignedLongWithDefault(T) MOZ_DELETE; - - void SetReadonlyUnsignedLongLong(uint64_t) MOZ_DELETE; - template - void SetWritableUnsignedLongLong(T) MOZ_DELETE; - template - void PassUnsignedLongLong(T) MOZ_DELETE; - template - void PassOptionalUnsignedLongLong(const Optional&) MOZ_DELETE; - template - void PassOptionalUnsignedLongLongWithDefault(T) MOZ_DELETE; - - // Enforce that only const things are passed for sequences - void PassSequence(Sequence &) MOZ_DELETE; - void PassNullableSequence(Nullable< Sequence >&) MOZ_DELETE; - void PassOptionalNullableSequenceWithDefaultValue(Nullable< Sequence >&) MOZ_DELETE; - - // Enforce that only const things are passed for optional - void PassOptionalByte(Optional&) MOZ_DELETE; - void PassOptionalNullableByte(Optional >&) MOZ_DELETE; - void PassOptionalShort(Optional&) MOZ_DELETE; - void PassOptionalLong(Optional&) MOZ_DELETE; - void PassOptionalLongLong(Optional&) MOZ_DELETE; - void PassOptionalOctet(Optional&) MOZ_DELETE; - void PassOptionalUnsignedShort(Optional&) MOZ_DELETE; - void PassOptionalUnsignedLong(Optional&) MOZ_DELETE; - void PassOptionalUnsignedLongLong(Optional&) MOZ_DELETE; - void PassOptionalSelf(Optional &) MOZ_DELETE; - void PassOptionalNonNullSelf(Optional >&) MOZ_DELETE; - void PassOptionalOther(Optional&); - void PassOptionalNonNullOther(Optional >&); - void PassOptionalExternal(Optional&) MOZ_DELETE; - void PassOptionalNonNullExternal(Optional&) MOZ_DELETE; - void PassOptionalSequence(Optional >&) MOZ_DELETE; - void PassOptionalNullableSequence(Optional > >&) MOZ_DELETE; - void PassOptionalObjectSequence(Optional > >&) MOZ_DELETE; - void PassOptionalArrayBuffer(Optional&) MOZ_DELETE; - void PassOptionalNullableArrayBuffer(Optional&) MOZ_DELETE; - void PassOptionalEnum(Optional&) MOZ_DELETE; - void PassOptionalCallback(JSContext*, Optional&) MOZ_DELETE; - void PassOptionalNullableCallback(JSContext*, Optional&) MOZ_DELETE; - void PassOptionalAny(Optional&) MOZ_DELETE; - - // And test that string stuff is always const - void PassString(nsAString&) MOZ_DELETE; - void PassNullableString(nsAString&) MOZ_DELETE; - void PassOptionalString(Optional&) MOZ_DELETE; - void PassOptionalStringWithDefaultValue(nsAString&) MOZ_DELETE; - void PassOptionalNullableString(Optional&) MOZ_DELETE; - void PassOptionalNullableStringWithDefaultValue(nsAString&) MOZ_DELETE; - -}; - -class TestIndexedGetterInterface : public nsISupports, - public nsWrapperCache -{ -public: - NS_DECL_ISUPPORTS - - // We need a GetParentObject to make binding codegen happy - virtual nsISupports* GetParentObject(); - - uint32_t IndexedGetter(uint32_t, bool&); - uint32_t IndexedGetter(uint32_t&) MOZ_DELETE; - uint32_t Item(uint32_t&); - uint32_t Item(uint32_t, bool&) MOZ_DELETE; - uint32_t Length(); -}; - -class TestNamedGetterInterface : public nsISupports, - public nsWrapperCache -{ -public: - NS_DECL_ISUPPORTS - - // We need a GetParentObject to make binding codegen happy - virtual nsISupports* GetParentObject(); - - void NamedGetter(const nsAString&, bool&, nsAString&); -}; - -class TestIndexedAndNamedGetterInterface : public nsISupports, - public nsWrapperCache -{ -public: - NS_DECL_ISUPPORTS - - // We need a GetParentObject to make binding codegen happy - virtual nsISupports* GetParentObject(); - - uint32_t IndexedGetter(uint32_t, bool&); - void NamedGetter(const nsAString&, bool&, nsAString&); - void NamedItem(const nsAString&, nsAString&); - uint32_t Length(); -}; - -class TestIndexedSetterInterface : public nsISupports, - public nsWrapperCache -{ -public: - NS_DECL_ISUPPORTS - - // We need a GetParentObject to make binding codegen happy - virtual nsISupports* GetParentObject(); - - void IndexedSetter(uint32_t, const nsAString&); - void SetItem(uint32_t, const nsAString&); -}; - -class TestNamedSetterInterface : public nsISupports, - public nsWrapperCache -{ -public: - NS_DECL_ISUPPORTS - - // We need a GetParentObject to make binding codegen happy - virtual nsISupports* GetParentObject(); - - void NamedSetter(const nsAString&, TestIndexedSetterInterface&); -}; - -class TestIndexedAndNamedSetterInterface : public nsISupports, - public nsWrapperCache -{ -public: - NS_DECL_ISUPPORTS - - // We need a GetParentObject to make binding codegen happy - virtual nsISupports* GetParentObject(); - - void IndexedSetter(uint32_t, TestIndexedSetterInterface&); - void NamedSetter(const nsAString&, TestIndexedSetterInterface&); - void SetNamedItem(const nsAString&, TestIndexedSetterInterface&); -}; - -class TestIndexedAndNamedGetterAndSetterInterface : public TestIndexedSetterInterface -{ -public: - uint32_t IndexedGetter(uint32_t, bool&); - uint32_t Item(uint32_t); - void NamedGetter(const nsAString&, bool&, nsAString&); - void NamedItem(const nsAString&, nsAString&); - void IndexedSetter(uint32_t, int32_t&); - void IndexedSetter(uint32_t, const nsAString&) MOZ_DELETE; - void NamedSetter(const nsAString&, const nsAString&); - void Stringify(nsAString&); - uint32_t Length(); -}; - -} // namespace dom -} // namespace mozilla - -#endif /* TestBindingHeader_h */ diff --git a/components/script/dom/bindings/codegen/test/TestCodeGen.webidl b/components/script/dom/bindings/codegen/test/TestCodeGen.webidl deleted file mode 100644 index 67c5fdf946b..00000000000 --- a/components/script/dom/bindings/codegen/test/TestCodeGen.webidl +++ /dev/null @@ -1,442 +0,0 @@ -/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -typedef long myLong; -typedef TestInterface AnotherNameForTestInterface; -typedef TestInterface? NullableTestInterface; - -interface TestExternalInterface; - -interface TestNonCastableInterface { -}; - -callback interface TestCallbackInterface { - readonly attribute long foo; - void doSomething(); -}; - -enum TestEnum { - "a", - "b" -}; - -callback TestCallback = void(); - -TestInterface implements ImplementedInterface; - -// This interface is only for use in the constructor below -interface OnlyForUseInConstructor { -}; - -[Constructor, - Constructor(DOMString str), - Constructor(unsigned long num, boolean? bool), - Constructor(TestInterface? iface), - Constructor(TestNonCastableInterface iface) - // , Constructor(long arg1, long arg2, (TestInterface or OnlyForUseInConstructor) arg3) - ] -interface TestInterface { - // Integer types - // XXXbz add tests for throwing versions of all the integer stuff - readonly attribute byte readonlyByte; - attribute byte writableByte; - void passByte(byte arg); - byte receiveByte(); - void passOptionalByte(optional byte arg); - void passOptionalByteWithDefault(optional byte arg = 0); - void passNullableByte(byte? arg); - void passOptionalNullableByte(optional byte? arg); - - readonly attribute short readonlyShort; - attribute short writableShort; - void passShort(short arg); - short receiveShort(); - void passOptionalShort(optional short arg); - void passOptionalShortWithDefault(optional short arg = 5); - - readonly attribute long readonlyLong; - attribute long writableLong; - void passLong(long arg); - long receiveLong(); - void passOptionalLong(optional long arg); - void passOptionalLongWithDefault(optional long arg = 7); - - readonly attribute long long readonlyLongLong; - attribute long long writableLongLong; - void passLongLong(long long arg); - long long receiveLongLong(); - void passOptionalLongLong(optional long long arg); - void passOptionalLongLongWithDefault(optional long long arg = -12); - - readonly attribute octet readonlyOctet; - attribute octet writableOctet; - void passOctet(octet arg); - octet receiveOctet(); - void passOptionalOctet(optional octet arg); - void passOptionalOctetWithDefault(optional octet arg = 19); - - readonly attribute unsigned short readonlyUnsignedShort; - attribute unsigned short writableUnsignedShort; - void passUnsignedShort(unsigned short arg); - unsigned short receiveUnsignedShort(); - void passOptionalUnsignedShort(optional unsigned short arg); - void passOptionalUnsignedShortWithDefault(optional unsigned short arg = 2); - - readonly attribute unsigned long readonlyUnsignedLong; - attribute unsigned long writableUnsignedLong; - void passUnsignedLong(unsigned long arg); - unsigned long receiveUnsignedLong(); - void passOptionalUnsignedLong(optional unsigned long arg); - void passOptionalUnsignedLongWithDefault(optional unsigned long arg = 6); - - readonly attribute unsigned long long readonlyUnsignedLongLong; - attribute unsigned long long writableUnsignedLongLong; - void passUnsignedLongLong(unsigned long long arg); - unsigned long long receiveUnsignedLongLong(); - void passOptionalUnsignedLongLong(optional unsigned long long arg); - void passOptionalUnsignedLongLongWithDefault(optional unsigned long long arg = 17); - - // Castable interface types - // XXXbz add tests for throwing versions of all the castable interface stuff - TestInterface receiveSelf(); - TestInterface? receiveNullableSelf(); - TestInterface receiveWeakSelf(); - TestInterface? receiveWeakNullableSelf(); - // A version to test for casting to TestInterface& - void passSelf(TestInterface arg); - // A version we can use to test for the exact type passed in - void passSelf2(TestInterface arg); - void passNullableSelf(TestInterface? arg); - attribute TestInterface nonNullSelf; - attribute TestInterface? nullableSelf; - // Optional arguments - void passOptionalSelf(optional TestInterface? arg); - void passOptionalNonNullSelf(optional TestInterface arg); - void passOptionalSelfWithDefault(optional TestInterface? arg = null); - - // Non-wrapper-cache interface types - [Creator] - TestNonWrapperCacheInterface receiveNonWrapperCacheInterface(); - [Creator] - TestNonWrapperCacheInterface? receiveNullableNonWrapperCacheInterface(); - [Creator] - sequence receiveNonWrapperCacheInterfaceSequence(); - [Creator] - sequence receiveNullableNonWrapperCacheInterfaceSequence(); - [Creator] - sequence? receiveNonWrapperCacheInterfaceNullableSequence(); - [Creator] - sequence? receiveNullableNonWrapperCacheInterfaceNullableSequence(); - - // Non-castable interface types - TestNonCastableInterface receiveOther(); - TestNonCastableInterface? receiveNullableOther(); - TestNonCastableInterface receiveWeakOther(); - TestNonCastableInterface? receiveWeakNullableOther(); - // A version to test for casting to TestNonCastableInterface& - void passOther(TestNonCastableInterface arg); - // A version we can use to test for the exact type passed in - void passOther2(TestNonCastableInterface arg); - void passNullableOther(TestNonCastableInterface? arg); - attribute TestNonCastableInterface nonNullOther; - attribute TestNonCastableInterface? nullableOther; - // Optional arguments - void passOptionalOther(optional TestNonCastableInterface? arg); - void passOptionalNonNullOther(optional TestNonCastableInterface arg); - void passOptionalOtherWithDefault(optional TestNonCastableInterface? arg = null); - - // External interface types - TestExternalInterface receiveExternal(); - TestExternalInterface? receiveNullableExternal(); - TestExternalInterface receiveWeakExternal(); - TestExternalInterface? receiveWeakNullableExternal(); - // A version to test for casting to TestExternalInterface& - void passExternal(TestExternalInterface arg); - // A version we can use to test for the exact type passed in - void passExternal2(TestExternalInterface arg); - void passNullableExternal(TestExternalInterface? arg); - attribute TestExternalInterface nonNullExternal; - attribute TestExternalInterface? nullableExternal; - // Optional arguments - void passOptionalExternal(optional TestExternalInterface? arg); - void passOptionalNonNullExternal(optional TestExternalInterface arg); - void passOptionalExternalWithDefault(optional TestExternalInterface? arg = null); - - // Callback interface types - TestCallbackInterface receiveCallbackInterface(); - TestCallbackInterface? receiveNullableCallbackInterface(); - TestCallbackInterface receiveWeakCallbackInterface(); - TestCallbackInterface? receiveWeakNullableCallbackInterface(); - // A version to test for casting to TestCallbackInterface& - void passCallbackInterface(TestCallbackInterface arg); - // A version we can use to test for the exact type passed in - void passCallbackInterface2(TestCallbackInterface arg); - void passNullableCallbackInterface(TestCallbackInterface? arg); - attribute TestCallbackInterface nonNullCallbackInterface; - attribute TestCallbackInterface? nullableCallbackInterface; - // Optional arguments - void passOptionalCallbackInterface(optional TestCallbackInterface? arg); - void passOptionalNonNullCallbackInterface(optional TestCallbackInterface arg); - void passOptionalCallbackInterfaceWithDefault(optional TestCallbackInterface? arg = null); - - // Miscellaneous interface tests - IndirectlyImplementedInterface receiveConsequentialInterface(); - void passConsequentialInterface(IndirectlyImplementedInterface arg); - - // Sequence types - sequence receiveSequence(); - sequence? receiveNullableSequence(); - sequence receiveSequenceOfNullableInts(); - sequence? receiveNullableSequenceOfNullableInts(); - void passSequence(sequence arg); - void passNullableSequence(sequence? arg); - void passSequenceOfNullableInts(sequence arg); - void passOptionalSequenceOfNullableInts(optional sequence arg); - void passOptionalNullableSequenceOfNullableInts(optional sequence? arg); - sequence receiveCastableObjectSequence(); - sequence receiveNullableCastableObjectSequence(); - sequence? receiveCastableObjectNullableSequence(); - sequence? receiveNullableCastableObjectNullableSequence(); - sequence receiveWeakCastableObjectSequence(); - sequence receiveWeakNullableCastableObjectSequence(); - sequence? receiveWeakCastableObjectNullableSequence(); - sequence? receiveWeakNullableCastableObjectNullableSequence(); - void passCastableObjectSequence(sequence arg); - void passNullableCastableObjectSequence(sequence arg); - void passCastableObjectNullableSequence(sequence? arg); - void passNullableCastableObjectNullableSequence(sequence? arg); - void passOptionalSequence(optional sequence arg); - void passOptionalNullableSequence(optional sequence? arg); - void passOptionalNullableSequenceWithDefaultValue(optional sequence? arg = null); - void passOptionalObjectSequence(optional sequence arg); - - sequence receiveStringSequence(); - void passStringSequence(sequence arg); - - sequence receiveAnySequence(); - sequence? receiveNullableAnySequence(); - - // Typed array types - void passArrayBuffer(ArrayBuffer arg); - void passNullableArrayBuffer(ArrayBuffer? arg); - void passOptionalArrayBuffer(optional ArrayBuffer arg); - void passOptionalNullableArrayBuffer(optional ArrayBuffer? arg); - void passOptionalNullableArrayBufferWithDefaultValue(optional ArrayBuffer? arg= null); - void passArrayBufferView(ArrayBufferView arg); - void passInt8Array(Int8Array arg); - void passInt16Array(Int16Array arg); - void passInt32Array(Int32Array arg); - void passUint8Array(Uint8Array arg); - void passUint16Array(Uint16Array arg); - void passUint32Array(Uint32Array arg); - void passUint8ClampedArray(Uint8ClampedArray arg); - void passFloat32Array(Float32Array arg); - void passFloat64Array(Float64Array arg); - Uint8Array receiveUint8Array(); - - // String types - void passString(DOMString arg); - void passNullableString(DOMString? arg); - void passOptionalString(optional DOMString arg); - void passOptionalStringWithDefaultValue(optional DOMString arg = "abc"); - void passOptionalNullableString(optional DOMString? arg); - void passOptionalNullableStringWithDefaultValue(optional DOMString? arg = null); - - // Enumerated types - void passEnum(TestEnum arg); - // No support for nullable enums yet - // void passNullableEnum(TestEnum? arg); - void passOptionalEnum(optional TestEnum arg); - void passEnumWithDefault(optional TestEnum arg = "a"); - // void passOptionalNullableEnum(optional TestEnum? arg); - // void passOptionalNullableEnumWithDefaultValue(optional TestEnum? arg = null); - TestEnum receiveEnum(); - attribute TestEnum enumAttribute; - readonly attribute TestEnum readonlyEnumAttribute; - - // Callback types - void passCallback(TestCallback arg); - void passNullableCallback(TestCallback? arg); - void passOptionalCallback(optional TestCallback arg); - void passOptionalNullableCallback(optional TestCallback? arg); - void passOptionalNullableCallbackWithDefaultValue(optional TestCallback? arg = null); - TestCallback receiveCallback(); - TestCallback? receiveNullableCallback(); - - // Any types - void passAny(any arg); - void passOptionalAny(optional any arg); - void passAnyDefaultNull(optional any arg = null); - any receiveAny(); - - // object types - void passObject(object arg); - void passNullableObject(object? arg); - void passOptionalObject(optional object arg); - void passOptionalNullableObject(optional object? arg); - void passOptionalNullableObjectWithDefaultValue(optional object? arg = null); - object receiveObject(); - object? receiveNullableObject(); - - // Union types - void passUnion((object or long) arg); - void passUnionWithNullable((object? or long) arg); - void passNullableUnion((object or long)? arg); - void passOptionalUnion(optional (object or long) arg); - void passOptionalNullableUnion(optional (object or long)? arg); - void passOptionalNullableUnionWithDefaultValue(optional (object or long)? arg = null); - //void passUnionWithInterfaces((TestInterface or TestExternalInterface) arg); - //void passUnionWithInterfacesAndNullable((TestInterface? or TestExternalInterface) arg); - //void passUnionWithSequence((sequence or long) arg); - void passUnionWithArrayBuffer((ArrayBuffer or long) arg); - void passUnionWithString((DOMString or object) arg); - //void passUnionWithEnum((TestEnum or object) arg); - void passUnionWithCallback((TestCallback or long) arg); - void passUnionWithObject((object or long) arg); - //void passUnionWithDict((Dict or long) arg); - - // binaryNames tests - void methodRenamedFrom(); - void methodRenamedFrom(byte argument); - readonly attribute byte attributeGetterRenamedFrom; - attribute byte attributeRenamedFrom; - - void passDictionary(optional Dict x); - void passOtherDictionary(optional GrandparentDict x); - void passSequenceOfDictionaries(sequence x); - void passDictionaryOrLong(optional Dict x); - void passDictionaryOrLong(long x); - - void passDictContainingDict(optional DictContainingDict arg); - void passDictContainingSequence(optional DictContainingSequence arg); - - // EnforceRange/Clamp tests - void dontEnforceRangeOrClamp(byte arg); - void doEnforceRange([EnforceRange] byte arg); - void doClamp([Clamp] byte arg); - - // Typedefs - const myLong myLongConstant = 5; - void exerciseTypedefInterfaces1(AnotherNameForTestInterface arg); - AnotherNameForTestInterface exerciseTypedefInterfaces2(NullableTestInterface arg); - void exerciseTypedefInterfaces3(YetAnotherNameForTestInterface arg); - - // Miscellania - [LenientThis] attribute long attrWithLenientThis; -}; - -interface TestNonWrapperCacheInterface { -}; - -interface ImplementedInterfaceParent { - void implementedParentMethod(); - attribute boolean implementedParentProperty; - - const long implementedParentConstant = 8; -}; - -ImplementedInterfaceParent implements IndirectlyImplementedInterface; - -[NoInterfaceObject] -interface IndirectlyImplementedInterface { - void indirectlyImplementedMethod(); - attribute boolean indirectlyImplementedProperty; - - const long indirectlyImplementedConstant = 9; -}; - -interface ImplementedInterface : ImplementedInterfaceParent { - void implementedMethod(); - attribute boolean implementedProperty; - - const long implementedConstant = 5; -}; - -interface DiamondImplements { - readonly attribute long diamondImplementedProperty; -}; -interface DiamondBranch1A { -}; -interface DiamondBranch1B { -}; -interface DiamondBranch2A : DiamondImplements { -}; -interface DiamondBranch2B : DiamondImplements { -}; -TestInterface implements DiamondBranch1A; -TestInterface implements DiamondBranch1B; -TestInterface implements DiamondBranch2A; -TestInterface implements DiamondBranch2B; -DiamondBranch1A implements DiamondImplements; -DiamondBranch1B implements DiamondImplements; - -dictionary Dict : ParentDict { - TestEnum someEnum; - long x; - long a; - long b = 8; - long z = 9; - DOMString str; - DOMString empty = ""; - TestEnum otherEnum = "b"; - DOMString otherStr = "def"; - DOMString? yetAnotherStr = null; -}; - -dictionary ParentDict : GrandparentDict { - long c = 5; - TestInterface someInterface; - TestExternalInterface someExternalInterface; -}; - -dictionary DictContainingDict { - Dict memberDict; -}; - -dictionary DictContainingSequence { - sequence ourSequence; -}; - -interface TestIndexedGetterInterface { - getter long item(unsigned long index); - [Infallible] - readonly attribute unsigned long length; -}; - -interface TestNamedGetterInterface { - getter DOMString (DOMString name); -}; - -interface TestIndexedAndNamedGetterInterface { - getter long (unsigned long index); - getter DOMString namedItem(DOMString name); - [Infallible] - readonly attribute unsigned long length; -}; - -interface TestIndexedSetterInterface { - setter creator void setItem(unsigned long index, DOMString item); -}; - -interface TestNamedSetterInterface { - setter creator void (DOMString name, TestIndexedSetterInterface item); -}; - -interface TestIndexedAndNamedSetterInterface { - setter creator void (unsigned long index, TestIndexedSetterInterface item); - setter creator void setNamedItem(DOMString name, TestIndexedSetterInterface item); -}; - -interface TestIndexedAndNamedGetterAndSetterInterface : TestIndexedSetterInterface { - getter long item(unsigned long index); - getter DOMString namedItem(DOMString name); - setter creator void (unsigned long index, long item); - setter creator void (DOMString name, DOMString item); - [Infallible] - stringifier DOMString (); - [Infallible] - readonly attribute unsigned long length; -}; diff --git a/components/script/dom/bindings/codegen/test/TestDictionary.webidl b/components/script/dom/bindings/codegen/test/TestDictionary.webidl deleted file mode 100644 index 37b7f5e84fb..00000000000 --- a/components/script/dom/bindings/codegen/test/TestDictionary.webidl +++ /dev/null @@ -1,9 +0,0 @@ -/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -dictionary GrandparentDict { - double someNum; -}; diff --git a/components/script/dom/bindings/codegen/test/TestTypedef.webidl b/components/script/dom/bindings/codegen/test/TestTypedef.webidl deleted file mode 100644 index 7f758c79e8f..00000000000 --- a/components/script/dom/bindings/codegen/test/TestTypedef.webidl +++ /dev/null @@ -1,7 +0,0 @@ -/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -typedef TestInterface YetAnotherNameForTestInterface; diff --git a/components/script/dom/bindings/codegen/test/file_bug775543.html b/components/script/dom/bindings/codegen/test/file_bug775543.html deleted file mode 100644 index ee8c14c4d9c..00000000000 --- a/components/script/dom/bindings/codegen/test/file_bug775543.html +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/components/script/dom/bindings/codegen/test/forOf_iframe.html b/components/script/dom/bindings/codegen/test/forOf_iframe.html deleted file mode 100644 index 91417aba0e8..00000000000 --- a/components/script/dom/bindings/codegen/test/forOf_iframe.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - iframe content for test_forOf_iframe.html - - -
- - - -
- - diff --git a/components/script/dom/bindings/codegen/test/test_InstanceOf.html b/components/script/dom/bindings/codegen/test/test_InstanceOf.html deleted file mode 100644 index 3a5a76b1b21..00000000000 --- a/components/script/dom/bindings/codegen/test/test_InstanceOf.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - Test for Bug 748983 - - - - -Mozilla Bug 748983 -

- -
-
-
- - diff --git a/components/script/dom/bindings/codegen/test/test_bug773326.html b/components/script/dom/bindings/codegen/test/test_bug773326.html deleted file mode 100644 index 2e3b1ea304d..00000000000 --- a/components/script/dom/bindings/codegen/test/test_bug773326.html +++ /dev/null @@ -1,11 +0,0 @@ - - -Test for Bug 773326 - - -
- diff --git a/components/script/dom/bindings/codegen/test/test_bug775543.html b/components/script/dom/bindings/codegen/test/test_bug775543.html deleted file mode 100644 index d8df05f630f..00000000000 --- a/components/script/dom/bindings/codegen/test/test_bug775543.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - Test for Bug 775543 - - - - -Mozilla Bug 775543 -

- -
-
-
- - diff --git a/components/script/dom/bindings/codegen/test/test_bug788369.html b/components/script/dom/bindings/codegen/test/test_bug788369.html deleted file mode 100644 index 787bd28fe34..00000000000 --- a/components/script/dom/bindings/codegen/test/test_bug788369.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Test for Bug 788369 - - - - -Mozilla Bug 788369 -

- -
-
-
- - diff --git a/components/script/dom/bindings/codegen/test/test_enums.html b/components/script/dom/bindings/codegen/test/test_enums.html deleted file mode 100644 index e5dc519a0c9..00000000000 --- a/components/script/dom/bindings/codegen/test/test_enums.html +++ /dev/null @@ -1,15 +0,0 @@ - - -Enums - - -
- diff --git a/components/script/dom/bindings/codegen/test/test_forOf.html b/components/script/dom/bindings/codegen/test/test_forOf.html deleted file mode 100644 index b1a3032a385..00000000000 --- a/components/script/dom/bindings/codegen/test/test_forOf.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - Test for Bug 725907 - - - - -Mozilla Bug 725907 -

- -
- - - -
-
-
-
-
-
-
- - diff --git a/components/script/dom/bindings/codegen/test/test_integers.html b/components/script/dom/bindings/codegen/test/test_integers.html deleted file mode 100644 index 6799fd791a8..00000000000 --- a/components/script/dom/bindings/codegen/test/test_integers.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - -

- -
-
-
- - diff --git a/components/script/dom/bindings/codegen/test/test_interfaceToString.html b/components/script/dom/bindings/codegen/test/test_interfaceToString.html deleted file mode 100644 index cf670bf2d54..00000000000 --- a/components/script/dom/bindings/codegen/test/test_interfaceToString.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - Test for Bug 742156 - - - - -Mozilla Bug 742156 -

- -
-
-
- - diff --git a/components/script/dom/bindings/codegen/test/test_lookupGetter.html b/components/script/dom/bindings/codegen/test/test_lookupGetter.html deleted file mode 100644 index 306ee4f643c..00000000000 --- a/components/script/dom/bindings/codegen/test/test_lookupGetter.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - Test for Bug 462428 - - - - -Mozilla Bug 462428 -

- -
-
-
- - diff --git a/components/script/dom/bindings/codegen/test/test_sequence_wrapping.html b/components/script/dom/bindings/codegen/test/test_sequence_wrapping.html deleted file mode 100644 index e4f18f9986c..00000000000 --- a/components/script/dom/bindings/codegen/test/test_sequence_wrapping.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - Test for Bug 775852 - - - - -Mozilla Bug 775852 -

- -
-
-
- - diff --git a/components/script/dom/bindings/codegen/test/test_traceProtos.html b/components/script/dom/bindings/codegen/test/test_traceProtos.html deleted file mode 100644 index 195876744d6..00000000000 --- a/components/script/dom/bindings/codegen/test/test_traceProtos.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - Test for Bug 744772 - - - - -Mozilla Bug 744772 -

- -
-
-
- -