Commit 9958b430 authored by Simon Giesecke's avatar Simon Giesecke
Browse files

Bug 934640 - Let 'Ensure that databases() returns a promise' test case accept...

Bug 934640 - Let 'Ensure that databases() returns a promise' test case accept a rejected Promise to match its description. r=dom-workers-and-storage-reviewers,ytausky

Before the patch, the test failed if indexedDB.databases() returns a promise, but the promise was rejected. This was not what "Ensure that databases() returns a promise." describes. Therefore, either the description should be changed, or the test. But there are other tests that check if the promise is resolved, I changed the test.

Differential Revision: https://phabricator.services.mozilla.com/D54142

--HG--
extra : moz-landing-system : lando
parent 09f3dec0
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
// META: script=support-promises.js

promise_test(async testCase => {
  assert_true(indexedDB.databases() instanceof Promise,
  let result = indexedDB.databases();
  assert_true(result instanceof Promise,
      "databases() should return a promise.");
  result.catch(() => {});
}, "Ensure that databases() returns a promise.");

promise_test(async testCase => {