function assertBlobTypeIsSafe(type, isSafe) {
  const safeUrl = SafeUrl.fromBlob(new Blob(['test'], {type: type}));
  const extracted = SafeUrl.unwrap(safeUrl);
  if (isSafe) {
    assertEquals('blob:', extracted.substring(0, 5));
  } else {
    assertEquals(SafeUrl.INNOCUOUS_STRING, extracted);
  }
}
Tests creating a SafeUrl from a blob with the given MIME type, asserting
whether or not the SafeUrl returned is innocuous or not depending on the
given boolean.
@param {string} type MIME type to test
@param {boolean} isSafe Whether the given MIME type should be considered safe
    by {@link SafeUrl.fromBlob}.