Commit e631b9e1 authored by Joshua Bell's avatar Joshua Bell Committed by Commit Bot

Deflake cache-storage/script-tests/cache-storage-match.js WPT

The test assumed no cache named 'foo' existed, but another test
cache-keys-attributes-for-service-worker creates a cache by that name,
so the test would flakily fail in some runs depending on the ordering
of the tests.

Make the test defensive by deleting such a cache before proceeding.

Bug: 840850
Change-Id: Ia349706c9a32af309cfadf9a63ba5cffea11998d
Reviewed-on: https://chromium-review.googlesource.com/1119104
Commit-Queue: Lucas Gadani <lfg@chromium.org>
Reviewed-by: default avatarLucas Gadani <lfg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572232}
parent a53eba8e
......@@ -117,7 +117,10 @@ promise_test(function(test) {
promise_test(function(test) {
var transaction = create_unique_transaction();
return self.caches.has('foo')
return self.caches.delete('foo')
.then(function() {
return self.caches.has('foo');
})
.then(function(has_foo) {
assert_false(has_foo, "The cache should not exist.");
return self.caches.match(transaction.request, {cacheName: 'foo'});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment