[WPT/common/security-features] Stop using assert_* from common.js

As preparation for
https://chromium-review.googlesource.com/c/chromium/src/+/1565621
this CL replaces assert_*() with Promise.reject() or throw,
to enable common.js to work without testharness.js and outside
promise_test().

Bug: 906850
Change-Id: Iea2b4621c44c0c28aaf1f9bb0a1412e4ef682c4d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1565556
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#653508}
1 file changed