Click each "given" link for a test and compare the field values in the generated compose form with the expected results. After the individual expected results, there's an equivalent_to link. Clicking it will load the expected values in a compose form, but note that the link could be affected by browser bugs, so use the individual expected values to double check.
Repeat the tests by dragging each "given" link to the tab bar.
Repeat the tests again by selecting each "given" link's textContent, copying the selection, and pasting it in a new, blank tab.
Repeat the tests again by passing each "given" link's textContent to the mail client (after quoting the textContent) on the command line with the client closed.
Repeat the tests again by passing each "given" link's textContent to the mail client (after quoting the textContent) on the command line with the client already open.
Hovering over expected Body values that contain newlines will show the JS literal value for clarity.
Test to make sure '#', '=' and '&' before first '?', extra '?' and extra '=' don't mess up parsing.
mailto:#1=2&3=4?subject=?#=&body=line1
#1=2&3=4
?#=
line1
Test case-insensitivity
mailto:?tO=1&sUbJeCt=2&bOdY=3&cC=4&bCc=5
mailto:?TO=1&SUBJECT=2&BODY=3&CC=4&BCC=5
1
2
3
4
5
Test case-insensitivity and examples of unnecessary percent-encoding an hname
mailto:?%74%4F=1&%73%55%62%4A%65%43%74=2&%62%4F%64%59=3&%63%43=4&%62%43%63=5
1
2
3
4
5
Test that invalid %HH are treated literally.
mailto:%3y%?subject=%3y%&body=%3y%&cc=%3y%&bcc=%3y%
%3y%
%3y%
%3y%
%3y%
%3y%
mailto:%253y%25?subject=%253y%25&body=%253y%25&cc=%253y%25&bcc=%253y%25
Test that unsafe %HH are treated literally (uppercase).
%00%01%02%03%04%05%06%07%08%0B%0C%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F
%00%01%02%03%04%05%06%07%08%0B%0C%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F
%00%01%02%03%04%05%06%07%08%0B%0C%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F
%00%01%02%03%04%05%06%07%08%0B%0C%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F
%00%01%02%03%04%05%06%07%08%0B%0C%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F
Test that unsafe %HH are treated literally (lowercase).
%00%01%02%03%04%05%06%07%08%0b%0c%0e%0f%10%11%12%13%14%15%16%17%18%19%1a%1b%1c%1d%1e%1f
%00%01%02%03%04%05%06%07%08%0b%0c%0e%0f%10%11%12%13%14%15%16%17%18%19%1a%1b%1c%1d%1e%1f
%00%01%02%03%04%05%06%07%08%0b%0c%0e%0f%10%11%12%13%14%15%16%17%18%19%1a%1b%1c%1d%1e%1f
%00%01%02%03%04%05%06%07%08%0b%0c%0e%0f%10%11%12%13%14%15%16%17%18%19%1a%1b%1c%1d%1e%1f
%00%01%02%03%04%05%06%07%08%0b%0c%0e%0f%10%11%12%13%14%15%16%17%18%19%1a%1b%1c%1d%1e%1f
Test to see if RFC2368 duplicate hname handling is supported (won't be supported if Smart duplicate hname handling is supported)
mailto:?to=1t&to=2t&subject=1&subject=2&body=1&body=2&cc=1&cc=2&bcc=1&bcc=2
mailto:1t?to=2t&subject=1&subject=2&body=1&body=2&cc=1&cc=2&bcc=1&bcc=2
mailto:3t?to=1t&to=2t&subject=1&subject=2&body=1&body=2&cc=1&cc=2&bcc=1&bcc=2
mailto:3t?tO=1t&To=2t&subject=1&sUbJeCt=2&body=1&bOdY=2&cc=1&cC=2&bcc=1&bCc=2
2t
2
2
2
2
Test to see if smart duplicate hname handling is supported (won't be supported if RFC2368 duplicate hname handling is supported)
1t, 2t, 3t
line1 line3
1, 2, 3
1, 2, 3
mailto:1t%2C%202t%2C%203t?body=line1%0D%0A%0D%0Aline3%0D%0A&cc=1%2C%202%2C%203&bcc=1%2C%202%2C%203
Test that newlines are stripped from to, cc, bcc and subject, but not body
line1line2
line1line2
line1 line2
line1line2
line1line2
mailto:line1line2?subject=line1line2&body=line1%0D%0Aline2&cc=line1line2&bcc=line1line2
Test that UTF-8 %HH sequence emit the chars they represent
mailto:%E2%88%9A?subject=%E2%88%9A&body=%E2%88%9A&cc=%E2%88%9A&bcc=%E2%88%9A
mailto:?to=%E2%88%9A&subject=%E2%88%9A&body=%E2%88%9A&cc=%E2%88%9A&bcc=%E2%88%9A
mailto:%e2%88%9a?subject=%e2%88%9a&body=%e2%88%9a&cc=%e2%88%9a&bcc=%e2%88%9a
mailto:?to=%e2%88%9a&subject=%e2%88%9a&body=%e2%88%9a&cc=%e2%88%9a&bcc=%e2%88%9a
√
√
√
√
√
mailto:%E2%88%9A?subject=%E2%88%9A&body=%E2%88%9A&cc=%E2%88%9A&bcc=%E2%88%9A
Test that a mailto URI with a To value that just has an integer is treated as a mailto URI (This will never pass when entering the URI in the address field. The URI will be treated as an http URI pointing to the 'mailto' domain on port 1.)
1