diff options
Diffstat (limited to 'testing/web-platform/tests/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js')
-rw-r--r-- | testing/web-platform/tests/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/testing/web-platform/tests/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js b/testing/web-platform/tests/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js index 80c164f560..ad2119b738 100644 --- a/testing/web-platform/tests/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js +++ b/testing/web-platform/tests/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js @@ -41,13 +41,14 @@ function sorted(s) { return Array.from(s).sort(); } -// Assert expected reasons and the reported reasons match. +// Assert expected reasons are all present. Note that the extra reasons are allowed +// as UAs might block bfcache for their specific reasons. function matchReasons(expectedNotRestoredReasonsSet, notRestoredReasonsSet) { const missing = setMinus( expectedNotRestoredReasonsSet, notRestoredReasonsSet, 'Missing reasons'); const extra = setMinus( notRestoredReasonsSet, expectedNotRestoredReasonsSet, 'Extra reasons'); - assert_true(missing.size + extra.size == 0, `Expected: ${sorted(expectedNotRestoredReasonsSet)}\n` + + assert_true(missing.size == 0, `Expected: ${sorted(expectedNotRestoredReasonsSet)}\n` + `Got: ${sorted(notRestoredReasonsSet)}\n` + `Missing: ${sorted(missing)}\n` + `Extra: ${sorted(extra)}\n`); |