Bug 48579 - HTML5 Conformance Test failure: approved/canvas/type.prototype.html
Summary: HTML5 Conformance Test failure: approved/canvas/type.prototype.html
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://test.w3.org/html/tests/approve...
Keywords:
Depends on:
Blocks: 48575
  Show dependency treegraph
 
Reported: 2010-10-28 16:28 PDT by David Kilzer (:ddkilzer)
Modified: 2016-10-06 09:43 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2010-10-28 16:28:40 PDT
The approved/canvas/type.prototype.html test fails with WebKit nightly build r70732 run in Safari 5.0.x.
Comment 1 Priyanka 2011-09-29 18:42:07 PDT
Hi,

I checked this test which is now present in location (Webkit\LayoutTests\canvas\philip\tests\type.prototype.html) and online location http://philip.html5.org/tests/canvas/suite/tests/type.prototype.html

with webkit revision on Windows 7  
Last Changed Rev: 95852
Last Changed Date: 2011-09-23 15:56:21 -0400 (Fri, 23 Sep 2011)

This test fails on Safari 5.1 and Firefox but passes on Opera.
The test fails because webkit does not allow the deletion of property "getContext" via script

delete window.HTMLCanvasElement.prototype.getContext;

The reason is - "getContext" has attribute "DontDelete | Function" so it does not permit the script to delete this property.

But I could not find any reference in WHATWG website whether this deletion should be allowed ??
Comment 2 Priyanka 2011-10-06 21:17:07 PDT
As mentioned in http://www.w3.org/TR/2011/WD-WebIDL-20110927/#interface-prototype-object

"There must exist an interface prototype object for every interface defined, regardless of whether the interface was declared with the [NoInterfaceObject] extended attribute. The interface prototype object for a particular interface has properties that correspond to the attributes and operations defined on that interface

4.5.6. Operations

For each unique identifier of an operation defined on the interface, there must be a corresponding property on the interface prototype object (if it is a regular operation) or the interface object (if it is a static operation),

The property has attributes { [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true }.
" 
In our case interface : JSHTMLCanvasElement
Comment 3 Priyanka 2011-10-06 21:37:42 PDT
As mentioned in the latest W3C Web IDL specification
http://www.w3.org/TR/2011/WD-WebIDL-20110927/#interface-prototype-object

"There must exist an interface prototype object for every interface defined, regardless of whether the interface was declared with the [NoInterfaceObject] extended attribute. The interface prototype object for a particular interface has properties that correspond to the attributes and operations defined on that interface

4.5.6. Operations

For each unique identifier of an operation defined on the interface, there must be a corresponding property on the interface prototype object (if it is a regular operation) or the interface object (if it is a static operation).

The property has attributes { [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true }."

So in our case the interface : JSHTMLCanvasElement
interface prototype : JSHTMLCanvasElementPrototype
operation : getContext

Correct me if I am wrong, shouldn't getContext be [[Configurable]]: true and hence we should be able to delete the property ??
Comment 4 Priyanka 2011-10-06 21:39:08 PDT
please ignore this comment - typo
Comment 5 David Kilzer (:ddkilzer) 2016-10-06 09:43:11 PDT
This appears to be working now with Safari Technology Preview 14 on macOS Sierra.