indexeddbshim / IndexedDBShim

A polyfill for IndexedDB using WebSql
Other
968 stars 191 forks source link

Interface testing issue: indexeddb expected as a getter #280

Closed brettz9 closed 5 years ago

brettz9 commented 7 years ago

Just reporting a minor issue encountered in testing.

Two of the W3C IndexedDB tests relate to interfaces (in the main thread or workers).

One of the expectations in the main thread is apparently that for this:

partial interface WindowOrWorkerGlobalScope {
  [SameObject] readonly attribute IDBFactory indexedDB;
};

...the indexedDB property is expected to be implemented as a getter (though for some reason, the testing does not insist that this be the case for the WorkerGlobalScope).

However, there is a bug in Node/jsdom which converts accessor property descriptors (as with a getter) into data descriptors when within a vm (where we execute the originally-HTML W3C tests to run in a sandbox and thus somewhat more safely).

And thus, we get a complaint from the main thread interface test that "indexedDB" must have a getter expected "function" (and switching to value/writable with its lack of a getter gets the same complaint).

A small issue of presumably little consequence except for tests but one which will hopefully be fixed (especially since we are otherwise already passing all of the other many interface tests).

brettz9 commented 5 years ago

Closing as underlying issue resolved and idlharness.any.html tests passing...