wpt-server-wpt-flags.sub.html (893B)
1 <!doctype html> 2 <html> 3 <head> 4 <title>WPT Server checker</title> 5 <meta charset="utf-8" /> 6 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharnessreport.js"></script> 8 <meta name="variant" content="?no_flag"> 9 <meta name="variant" content="?wpt_flags=h2"> 10 <meta name="variant" content="?wpt_flags=https"> 11 </head> 12 </body> 13 <body> 14 <script> 15 16 if (location.search == '?wpt_flags=h2') { 17 test(function() { 18 assert_equals(document.location.port, "{{ports[h2][0]}}"); 19 }, "h2 port with wpt_flags=h2") 20 } else if (location.search == '?wpt_flags=https') { 21 test(function() { 22 assert_equals(document.location.port, "{{ports[https][0]}}"); 23 }, "https port with wpt_flags=https") 24 } else { 25 test(function() { 26 assert_equals(document.location.port, "{{ports[http][0]}}"); 27 }, "http port without flag") 28 } 29 30 </script> 31 </body> 32 </html>