Skip to content
Permalink
Browse files
[Web IDL] interface objects should be Function objects
https://bugs.webkit.org/show_bug.cgi?id=154038
<rdar://problem/24569358>

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Rebaseline W3C tests now that more checks are passing. Some checks still
fail because a lot of our interfaces should inherit EventTarget and
currently don't (they duplicate the EventTarget API instead).

Also, as per WebIDL, window.NodeFilter's proto should be ObjectPrototype
instead of FunctionPrototype but this is an exceptional case and our new
behavior is consistent with Firefox and Chrome.

* web-platform-tests/XMLHttpRequest/interfaces-expected.txt:
* web-platform-tests/dom/events/Event-constructors-expected.txt:
* web-platform-tests/dom/historical-expected.txt:
* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/fetch/api/headers/headers-idl-expected.txt:
* web-platform-tests/fetch/api/request/request-idl-expected.txt:
* web-platform-tests/html/dom/interfaces-expected.txt:
* web-platform-tests/html/semantics/embedded-content/the-audio-element/audio_constructor-expected.txt:

Source/JavaScriptCore:

Update functionProtoFuncToString() to handle JSObjects that
have the TypeOfShouldCallGetCallData flag and are callable,
as these behave like functions and use ClassInfo::className()
as function name in this case.

* runtime/FunctionPrototype.cpp:
(JSC::functionProtoFuncToString):

Source/WebCore:

interface objects should be Function objects as per Web IDL:
- http://heycam.github.io/webidl/#interface-object
- http://heycam.github.io/webidl/#es-interfaces

So window.Event should be a Function object for e.g. but in WebKit it
is a regular EventConstructor JSObject.
Firefox and Chrome match the specification.

Test: js/interface-objects.html

* bindings/js/JSDOMBinding.cpp:
(WebCore::callThrowTypeError):
(WebCore::DOMConstructorObject::getCallData):
When calling the interface object as a function, we throw a TypeError
with a message asking to use the 'new' operator to match the behavior
of Firefox and Chrome.

* bindings/js/JSDOMBinding.h:
Add JSC::TypeOfShouldCallGetCallData structure flag and implement
getCallData() so that typeof returns "function", as per the
specification and the behavior of other browsers.

(WebCore::DOMConstructorObject::className):
Implement className() and return "Function" to match the specification and
other browsers. Otherwise, it would fall back to using ClassInfo::className
which os the function name and interface name (e.g. "Event").

* bindings/js/JSDOMConstructor.h:
(WebCore::JSDOMConstructorNotConstructable::callThrowTypeError):
(WebCore::JSDOMConstructorNotConstructable::getCallData):
As per the specification, interfaces that do not have a [Constructor]
should throw a TypeError when called as a function. Use the "Illegal
constructor" error message to match Firefox and Chrome.

* bindings/js/JSDOMGlobalObject.h:
(WebCore::getDOMConstructor):
Instead of using objectPrototype as prototype for all DOM constructors,
we now call the prototypeForStructure() static function that is
generated for each bindings class. As per the Web IDL specification,
The [[Prototype]] internal property of an interface object for a
non-callback interface is determined as follows:
1. If the interface inherits from some other interface, the value of
   [[Prototype]] is the interface object for that other interface.
2. If the interface doesn't inherit from any other interface, the value
   of [[Prototype]] is %FunctionPrototype% ([ECMA-262], section 6.1.7.4).

* bindings/js/JSImageConstructor.cpp:
(WebCore::JSImageConstructor::prototypeForStructure):
Have the Image's interface object use HTMLElement's interface object
as prototype as HTMLImageElement inherits HTMLElement.

* bindings/scripts/CodeGenerator.pm:
(getInterfaceExtendedAttributesFromName):
Add a utility function to cheaply retrieve an interface's IDL extended
attributes without actually parsing the IDL. This is used to check if
an interface's parent is marked as [NoInterfaceObject] currently.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
(GenerateCallbackHeader):
(GenerateCallbackImplementation):
Mark JSGlobalObject* parameter as const as the implementation does not
alter the globalObject.

(GenerateConstructorHelperMethods):
- Generate prototypeForStructure() function for each bindings class that
  is not marked as [NoInterfaceObject] so getDOMConstructor() knows which
  prototype to use for the interface object / constructor when constructing
  it.
- Use the interface name for the interface object, without the "Constructor"
  suffix, to match the behavior of Firefox and Chrome.

* bindings/scripts/test/*:
Rebaseline bindings tests.

LayoutTests:

Rebaseline / update existing layout tests now that interface objects
are now Function objects. Also add a layout test to cover various
aspects of interface objects.

* css3/blending/background-blend-mode-property-parsing-expected.txt:
* css3/blending/blend-mode-property-parsing-expected.txt:
* css3/blending/script-tests/background-blend-mode-property-parsing.js:
(shouldBeType):
* css3/blending/script-tests/blend-mode-property-parsing.js:
(shouldBeType):
* css3/filters/backdrop/backdropfilter-property-parsing-expected.txt:
* css3/filters/backdrop/script-tests/backdropfilter-property-parsing.js:
(shouldBeType):
* css3/filters/filter-property-parsing-expected.txt:
* css3/filters/script-tests/filter-property-parsing.js:
(shouldBeType):
* fast/css/image-set-parsing-expected.txt:
* fast/css/script-tests/image-set-parsing.js:
(shouldBeType):
* fast/dom/DOMException/XPathException-expected.txt:
* fast/dom/DOMException/prototype-object-expected.txt:
* fast/dom/DOMException/prototype-object.html:
* fast/dom/DOMException/resources/XPathException.js:
* fast/dom/MutationObserver/mutation-record-constructor-expected.txt:
* fast/dom/MutationObserver/mutation-record-constructor.html:
* fast/dom/Window/element-constructors-on-window-expected.txt:
* fast/dom/call-a-constructor-as-a-function-expected.txt:
* fast/dom/constructor-proto-expected.txt:
* fast/dom/constructor-proto.html:
* fast/dom/wrapper-classes-expected.txt:
* fast/dom/wrapper-classes.html:
* fast/mediastream/MediaStreamConstructor-expected.txt:
* fast/mediastream/MediaStreamConstructor.html:
* fast/workers/constructor-proto-expected.txt:
* fast/workers/worker-location-expected.txt:
* http/tests/xmlhttprequest/XMLHttpRequestException-expected.txt:
* http/tests/xmlhttprequest/XMLHttpRequestException.html:
* js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
* js/dom/script-tests/global-constructors-attributes-idb.js:
(constructorPropertiesOnGlobalObject):
* js/dom/script-tests/global-constructors-attributes.js:
(constructorPropertiesOnGlobalObject):
* js/interface-objects-expected.txt: Added.
* js/interface-objects.html: Added.
* media/encrypted-media/encrypted-media-v2-syntax-expected.txt:
* media/encrypted-media/encrypted-media-v2-syntax.html:
* media/track/track-vttcue-expected.txt:
* platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* svg/custom/SVGException-expected.txt:
* svg/custom/global-constructors-expected.txt:
* svg/custom/script-tests/SVGException.js:
* svg/custom/script-tests/global-constructors.js:
(shouldBeDefined):
* transforms/2d/transform-value-types-expected.txt:
* transforms/2d/transform-value-types.html:

Canonical link: https://commits.webkit.org/172193@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@196392 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
cdumez committed Feb 10, 2016
1 parent 6e2c521 commit 632e863d5c4fa1371339bdf6d4f1d51d1339bfbd
Showing with 2,263 additions and 1,183 deletions.
  1. +65 −0 LayoutTests/ChangeLog
  2. +12 −12 LayoutTests/css3/blending/background-blend-mode-property-parsing-expected.txt
  3. +14 −14 LayoutTests/css3/blending/blend-mode-property-parsing-expected.txt
  4. +1 −1 LayoutTests/css3/blending/script-tests/background-blend-mode-property-parsing.js
  5. +1 −1 LayoutTests/css3/blending/script-tests/blend-mode-property-parsing.js
  6. +77 −77 LayoutTests/css3/filters/backdrop/backdropfilter-property-parsing-expected.txt
  7. +1 −1 LayoutTests/css3/filters/backdrop/script-tests/backdropfilter-property-parsing.js
  8. +77 −77 LayoutTests/css3/filters/filter-property-parsing-expected.txt
  9. +1 −1 LayoutTests/css3/filters/script-tests/filter-property-parsing.js
  10. +9 −9 LayoutTests/fast/css/image-set-parsing-expected.txt
  11. +1 −1 LayoutTests/fast/css/script-tests/image-set-parsing.js
  12. +1 −1 LayoutTests/fast/dom/DOMException/XPathException-expected.txt
  13. +1 −1 LayoutTests/fast/dom/DOMException/prototype-object-expected.txt
  14. +1 −1 LayoutTests/fast/dom/DOMException/prototype-object.html
  15. +1 −1 LayoutTests/fast/dom/DOMException/resources/XPathException.js
  16. +2 −2 LayoutTests/fast/dom/MutationObserver/mutation-record-constructor-expected.txt
  17. +1 −1 LayoutTests/fast/dom/MutationObserver/mutation-record-constructor.html
  18. +54 −54 LayoutTests/fast/dom/Window/element-constructors-on-window-expected.txt
  19. +13 −13 LayoutTests/fast/dom/call-a-constructor-as-a-function-expected.txt
  20. +1 −1 LayoutTests/fast/dom/constructor-proto-expected.txt
  21. +1 −1 LayoutTests/fast/dom/constructor-proto.html
  22. +153 −153 LayoutTests/fast/dom/wrapper-classes-expected.txt
  23. +2 −2 LayoutTests/fast/dom/wrapper-classes.html
  24. +8 −8 LayoutTests/fast/mediastream/MediaStreamConstructor-expected.txt
  25. +2 −2 LayoutTests/fast/mediastream/MediaStreamConstructor.html
  26. +3 −1 LayoutTests/fast/workers/constructor-proto-expected.txt
  27. +1 −1 LayoutTests/fast/workers/worker-location-expected.txt
  28. +79 −79 LayoutTests/http/tests/security/cross-frame-access-put-expected.txt
  29. +3 −1 LayoutTests/http/tests/xmlhttprequest/XMLHttpRequestException-expected.txt
  30. +1 −1 LayoutTests/http/tests/xmlhttprequest/XMLHttpRequestException.html
  31. +25 −0 LayoutTests/imported/w3c/ChangeLog
  32. +4 −4 LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/interfaces-expected.txt
  33. +1 −1 LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-constructors-expected.txt
  34. +6 −2 LayoutTests/imported/w3c/web-platform-tests/dom/historical-expected.txt
  35. +35 −25 LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt
  36. +1 −1 LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-idl-expected.txt
  37. +1 −1 LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-idl-expected.txt
  38. +157 −117 LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt
  39. +6 −6 ...b-platform-tests/html/semantics/embedded-content/the-audio-element/audio_constructor-expected.txt
  40. +160 −0 LayoutTests/js/dom/global-constructors-attributes-dedicated-worker-expected.txt
  41. +4 −3 LayoutTests/js/dom/script-tests/global-constructors-attributes-idb.js
  42. +4 −3 LayoutTests/js/dom/script-tests/global-constructors-attributes.js
  43. +38 −0 LayoutTests/js/interface-objects-expected.txt
  44. +41 −0 LayoutTests/js/interface-objects.html
  45. +1 −1 LayoutTests/media/encrypted-media/encrypted-media-v2-syntax-expected.txt
  46. +1 −1 LayoutTests/media/encrypted-media/encrypted-media-v2-syntax.html
  47. +4 −4 LayoutTests/media/track/track-vttcue-expected.txt
  48. +160 −0 LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt
  49. +242 −242 LayoutTests/platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt
  50. +160 −0 LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt
  51. +1 −1 LayoutTests/svg/custom/SVGException-expected.txt
  52. +182 −152 LayoutTests/svg/custom/global-constructors-expected.txt
  53. +1 −1 LayoutTests/svg/custom/script-tests/SVGException.js
  54. +2 −2 LayoutTests/svg/custom/script-tests/global-constructors.js
  55. +2 −2 LayoutTests/transforms/2d/transform-value-types-expected.txt
  56. +1 −1 LayoutTests/transforms/2d/transform-value-types.html
  57. +16 −0 Source/JavaScriptCore/ChangeLog
  58. +11 −0 Source/JavaScriptCore/runtime/FunctionPrototype.cpp
  59. +84 −0 Source/WebCore/ChangeLog
  60. +12 −0 Source/WebCore/bindings/js/JSDOMBinding.cpp
  61. +4 −1 Source/WebCore/bindings/js/JSDOMBinding.h
  62. +24 −0 Source/WebCore/bindings/js/JSDOMConstructor.h
  63. +1 −1 Source/WebCore/bindings/js/JSDOMGlobalObject.h
  64. +5 −0 Source/WebCore/bindings/js/JSImageConstructor.cpp
  65. +31 −0 Source/WebCore/bindings/scripts/CodeGenerator.pm
  66. +25 −7 Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
  67. +9 −3 Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp
  68. +1 −1 Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h
  69. +9 −3 Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp
  70. +1 −1 Source/WebCore/bindings/scripts/test/JS/JSTestCallback.h
  71. +9 −3 Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp
  72. +1 −1 Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h
  73. +7 −1 Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp
  74. +9 −3 Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp
  75. +1 −1 Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h
  76. +9 −3 Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp
  77. +1 −1 Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h
  78. +9 −3 Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp
  79. +1 −1 Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h
  80. +9 −3 Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp
  81. +1 −1 Source/WebCore/bindings/scripts/test/JS/JSTestException.h
  82. +9 −3 Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp
  83. +1 −1 Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.h
  84. +9 −3 Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
  85. +1 −1 Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h
  86. +9 −3 Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp
  87. +1 −1 Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h
  88. +9 −3 Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
  89. +1 −1 Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h
  90. +16 −4 Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp
  91. +1 −1 Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h
  92. +8 −3 Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp
  93. +1 −1 Source/WebCore/bindings/scripts/test/JS/JSTestNode.h
  94. +9 −3 Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp
  95. +1 −1 Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h
  96. +9 −3 Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
  97. +1 −1 Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
  98. +9 −3 Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp
  99. +1 −1 Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.h
  100. +9 −3 Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp
  101. +1 −1 Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.h
  102. +9 −3 Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
  103. +1 −1 Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h
  104. +9 −3 Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
  105. +1 −1 Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h
  106. +9 −3 Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp
  107. +1 −1 Source/WebCore/bindings/scripts/test/JS/JSattribute.h
  108. +9 −3 Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp
  109. +1 −1 Source/WebCore/bindings/scripts/test/JS/JSreadonly.h
@@ -1,3 +1,68 @@
2016-02-10 Chris Dumez <cdumez@apple.com>

[Web IDL] interface objects should be Function objects
https://bugs.webkit.org/show_bug.cgi?id=154038
<rdar://problem/24569358>

Reviewed by Geoffrey Garen.

Rebaseline / update existing layout tests now that interface objects
are now Function objects. Also add a layout test to cover various
aspects of interface objects.

* css3/blending/background-blend-mode-property-parsing-expected.txt:
* css3/blending/blend-mode-property-parsing-expected.txt:
* css3/blending/script-tests/background-blend-mode-property-parsing.js:
(shouldBeType):
* css3/blending/script-tests/blend-mode-property-parsing.js:
(shouldBeType):
* css3/filters/backdrop/backdropfilter-property-parsing-expected.txt:
* css3/filters/backdrop/script-tests/backdropfilter-property-parsing.js:
(shouldBeType):
* css3/filters/filter-property-parsing-expected.txt:
* css3/filters/script-tests/filter-property-parsing.js:
(shouldBeType):
* fast/css/image-set-parsing-expected.txt:
* fast/css/script-tests/image-set-parsing.js:
(shouldBeType):
* fast/dom/DOMException/XPathException-expected.txt:
* fast/dom/DOMException/prototype-object-expected.txt:
* fast/dom/DOMException/prototype-object.html:
* fast/dom/DOMException/resources/XPathException.js:
* fast/dom/MutationObserver/mutation-record-constructor-expected.txt:
* fast/dom/MutationObserver/mutation-record-constructor.html:
* fast/dom/Window/element-constructors-on-window-expected.txt:
* fast/dom/call-a-constructor-as-a-function-expected.txt:
* fast/dom/constructor-proto-expected.txt:
* fast/dom/constructor-proto.html:
* fast/dom/wrapper-classes-expected.txt:
* fast/dom/wrapper-classes.html:
* fast/mediastream/MediaStreamConstructor-expected.txt:
* fast/mediastream/MediaStreamConstructor.html:
* fast/workers/constructor-proto-expected.txt:
* fast/workers/worker-location-expected.txt:
* http/tests/xmlhttprequest/XMLHttpRequestException-expected.txt:
* http/tests/xmlhttprequest/XMLHttpRequestException.html:
* js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
* js/dom/script-tests/global-constructors-attributes-idb.js:
(constructorPropertiesOnGlobalObject):
* js/dom/script-tests/global-constructors-attributes.js:
(constructorPropertiesOnGlobalObject):
* js/interface-objects-expected.txt: Added.
* js/interface-objects.html: Added.
* media/encrypted-media/encrypted-media-v2-syntax-expected.txt:
* media/encrypted-media/encrypted-media-v2-syntax.html:
* media/track/track-vttcue-expected.txt:
* platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* svg/custom/SVGException-expected.txt:
* svg/custom/global-constructors-expected.txt:
* svg/custom/script-tests/SVGException.js:
* svg/custom/script-tests/global-constructors.js:
(shouldBeDefined):
* transforms/2d/transform-value-types-expected.txt:
* transforms/2d/transform-value-types.html:

2016-02-10 Ryan Haddad <ryanhaddad@apple.com>

Marking fast/css-generated-content/details-summary-before-after.html as failing on ios-simulator
@@ -10,95 +10,95 @@ PASS declaration.length is 1
PASS declaration.getPropertyValue('background-blend-mode') is 'normal'
PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'

Basic reference : multiply, screen
PASS cssRule.type is 1
PASS declaration.length is 1
PASS declaration.getPropertyValue('background-blend-mode') is 'multiply, screen'
PASS jsWrapperClass(blendModeRule) is 'CSSValueList'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSValueListPrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSValueListConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'

Basic reference : screen, multiply
PASS cssRule.type is 1
PASS declaration.length is 1
PASS declaration.getPropertyValue('background-blend-mode') is 'screen, multiply'
PASS jsWrapperClass(blendModeRule) is 'CSSValueList'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSValueListPrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSValueListConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'

Basic reference : overlay, normal
PASS cssRule.type is 1
PASS declaration.length is 1
PASS declaration.getPropertyValue('background-blend-mode') is 'overlay, normal'
PASS jsWrapperClass(blendModeRule) is 'CSSValueList'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSValueListPrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSValueListConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'

Basic reference : darken, lighten, normal, multiply
PASS cssRule.type is 1
PASS declaration.length is 1
PASS declaration.getPropertyValue('background-blend-mode') is 'darken, lighten, normal, multiply'
PASS jsWrapperClass(blendModeRule) is 'CSSValueList'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSValueListPrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSValueListConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'

Basic reference : lighten
PASS cssRule.type is 1
PASS declaration.length is 1
PASS declaration.getPropertyValue('background-blend-mode') is 'lighten'
PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'

Basic reference : color-dodge
PASS cssRule.type is 1
PASS declaration.length is 1
PASS declaration.getPropertyValue('background-blend-mode') is 'color-dodge'
PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'

Basic reference : color-burn
PASS cssRule.type is 1
PASS declaration.length is 1
PASS declaration.getPropertyValue('background-blend-mode') is 'color-burn'
PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'

Basic reference : hard-light
PASS cssRule.type is 1
PASS declaration.length is 1
PASS declaration.getPropertyValue('background-blend-mode') is 'hard-light'
PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'

Basic reference : soft-light
PASS cssRule.type is 1
PASS declaration.length is 1
PASS declaration.getPropertyValue('background-blend-mode') is 'soft-light'
PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'

Basic reference : difference
PASS cssRule.type is 1
PASS declaration.length is 1
PASS declaration.getPropertyValue('background-blend-mode') is 'difference'
PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'

Basic reference : exclusion
PASS cssRule.type is 1
PASS declaration.length is 1
PASS declaration.getPropertyValue('background-blend-mode') is 'exclusion'
PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'
PASS successfullyParsed is true

TEST COMPLETE
@@ -10,111 +10,111 @@ PASS declaration.length is 1
PASS declaration.getPropertyValue('mix-blend-mode') is 'normal'
PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'

Basic reference : multiply
PASS cssRule.type is 1
PASS declaration.length is 1
PASS declaration.getPropertyValue('mix-blend-mode') is 'multiply'
PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'

Basic reference : screen
PASS cssRule.type is 1
PASS declaration.length is 1
PASS declaration.getPropertyValue('mix-blend-mode') is 'screen'
PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'

Basic reference : overlay
PASS cssRule.type is 1
PASS declaration.length is 1
PASS declaration.getPropertyValue('mix-blend-mode') is 'overlay'
PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'

Basic reference : darken
PASS cssRule.type is 1
PASS declaration.length is 1
PASS declaration.getPropertyValue('mix-blend-mode') is 'darken'
PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'

Basic reference : lighten
PASS cssRule.type is 1
PASS declaration.length is 1
PASS declaration.getPropertyValue('mix-blend-mode') is 'lighten'
PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'

Basic reference : color-dodge
PASS cssRule.type is 1
PASS declaration.length is 1
PASS declaration.getPropertyValue('mix-blend-mode') is 'color-dodge'
PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'

Basic reference : color-burn
PASS cssRule.type is 1
PASS declaration.length is 1
PASS declaration.getPropertyValue('mix-blend-mode') is 'color-burn'
PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'

Basic reference : hard-light
PASS cssRule.type is 1
PASS declaration.length is 1
PASS declaration.getPropertyValue('mix-blend-mode') is 'hard-light'
PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'

Basic reference : soft-light
PASS cssRule.type is 1
PASS declaration.length is 1
PASS declaration.getPropertyValue('mix-blend-mode') is 'soft-light'
PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'

Basic reference : difference
PASS cssRule.type is 1
PASS declaration.length is 1
PASS declaration.getPropertyValue('mix-blend-mode') is 'difference'
PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'

Basic reference : exclusion
PASS cssRule.type is 1
PASS declaration.length is 1
PASS declaration.getPropertyValue('mix-blend-mode') is 'exclusion'
PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'

Basic reference : plus-darker
PASS cssRule.type is 1
PASS declaration.length is 1
PASS declaration.getPropertyValue('mix-blend-mode') is 'plus-darker'
PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'

Basic reference : plus-lighter
PASS cssRule.type is 1
PASS declaration.length is 1
PASS declaration.getPropertyValue('mix-blend-mode') is 'plus-lighter'
PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
PASS jsWrapperClass(blendModeRule.constructor) is 'Function'
PASS successfullyParsed is true

TEST COMPLETE
@@ -16,7 +16,7 @@ function shouldBeType(expression, className, prototypeName, constructorName)
constructorName = className + "Constructor";
shouldBe("jsWrapperClass(" + expression + ")", "'" + className + "'");
shouldBe("jsWrapperClass(" + expression + ".__proto__)", "'" + prototypeName + "'");
shouldBe("jsWrapperClass(" + expression + ".constructor)", "'" + constructorName + "'");
shouldBe("jsWrapperClass(" + expression + ".constructor)", "'Function'");
}

// These have to be global for the test helpers to see them.
@@ -16,7 +16,7 @@ function shouldBeType(expression, className, prototypeName, constructorName)
constructorName = className + "Constructor";
shouldBe("jsWrapperClass(" + expression + ")", "'" + className + "'");
shouldBe("jsWrapperClass(" + expression + ".__proto__)", "'" + prototypeName + "'");
shouldBe("jsWrapperClass(" + expression + ".constructor)", "'" + constructorName + "'");
shouldBe("jsWrapperClass(" + expression + ".constructor)", "'Function'");
}

// These have to be global for the test helpers to see them.

0 comments on commit 632e863

Please sign in to comment.