summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.tentative.https.html
blob: 0120aaa12ff87482e3dd116e71fec66e6aeca7db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE html>
<meta charset='utf-8'>
<title>protocol handlers</title>

<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>

<script>
// This should be merged into protocol.https.html when/if
// https://github.com/whatwg/html/pull/5482 is approved.
[
  'cabal',
  'dat',
  'did',
  'dweb',
  'ethereum',
  'hyper',
  'ipfs',
  'ipns',
  'ssb',
].forEach(scheme => {
  test(() => {
    navigator.registerProtocolHandler(scheme, location.href + '/%s', "foo");
  }, 'registerProtocolHandler: overriding the "' + scheme + '" protocol should work');

  test(() => {
    navigator.unregisterProtocolHandler(scheme, location.href + '/%s');
  }, 'unregisterProtocolHandler: overriding the "' + scheme + '" protocol should work');
});
</script>