Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

indexeddbblob: Fix test not triggering, update metadata #2608

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Xenonym
Copy link
Contributor

@Xenonym Xenonym commented Oct 5, 2020

  • indexeddbblob: Fix test never triggering

    The indexedbblob test never triggers, even on platforms that support IndexedDB or blobs in IndexedDB databases.

    This is because in 164e757, indexeddb was changed to an async test, but indexeddbblob still assumes that indexeddb test is synchronous. Therefore, the indexeddb check is never true and indexedbblob never triggers.

    The onsuccess / onerror / exception handlers also assign the test result to a shared variable before calling addTest(), which results in the test result being always false as the variable will not be updated synchronously before addTest().

    Let's:

    • wrap the indexeddbblob test in a on('indexeddb.deletedatabase') listener, so that it will trigger when indexeddb and indexeddb.deletedatabase pass
    • call addTest() in the onsuccess / onerror / exception handlers instead of assigning to a shared variable
  • indexeddbblob: Add missing metadata properties

    • add storage tag
    • mark as async

The `indexedbblob` test never triggers, even on platforms that support
IndexedDB or blobs in IndexedDB databases.

This is because in 164e757, `indexeddb` was changed to an async test,
but `indexeddbblob` still assumes that `indexeddb` test is synchronous.
Therefore, the `indexeddb` check is never true and `indexedbblob` never
triggers.

The `onsuccess` / `onerror` / exception handlers also assign the test
result to a shared variable before calling `addTest()`, which results
in the test result being always false as the variable will not be
updated synchronously before `addTest()`.

Let's:

* wrap the `indexeddbblob` test in a `on('indexeddb.deletedatabase')`
listener, so that it will trigger when `indexeddb` and
`indexeddb.deletedatabase` pass

* call `addTest()` in the `onsuccess` / `onerror` / exception handlers
instead of assigning to a shared variable
* add `storage` tag

* mark as async
@rejas
Copy link
Member

rejas commented Oct 6, 2020

Thx @Xenonym that sounds very reasonable. What do you think @patrickkettner sicne you wrote the original tests?

@Xenonym
Copy link
Contributor Author

Xenonym commented Oct 26, 2020

@rejas

Would you be so kind as to label this PR hacktoberfest-accepted or approve this PR if this is not going to be merged before Oct 31? 😃

@Monib007
Copy link

Monib007 commented Oct 9, 2023

hey could you assign me this task and let me contribute?

@rejas
Copy link
Member

rejas commented Oct 13, 2023

hey could you assign me this task and let me contribute?

could you look for another issue. This PR is stale and not currently worked but still somebody else worked on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants