1<!doctype html> 2<html> 3<head> 4 <title>Popup for Proxy API Test</title> 5 <link rel="stylesheet" type="text/css" href="./unittest.css"> 6 <script src="./jsunittest.js"></script> 7 <script src="../proxy_form_controller.js"></script> 8</head> 9<body> 10 <h1>Proxy Configuration Unit Tests</h1> 11 12 <h2>ProxyFormController</h2> 13 <div id="proxyformcontrollerlog"></div> 14 15 <div id="fixture"> 16 <form id="proxyForm"> 17 <fieldset id="system"> 18 <legend>System Settings</legend> 19 <input type="radio" name="proxyType" id="proxyTypeSystem" value="system"> 20 <label for="proxyTypeSystem">Use the <em>system's proxy settings</em>.</label> 21 </fieldset> 22 <fieldset id="direct"> 23 <legend>Direct Connection</legend> 24 <input type="radio" name="proxyType" id="proxyTypeDirect" value="direct"> 25 <label for="proxyTypeDirect">Your computer is <em>directly connected</em> to the internet; no need for a proxy.</label> 26 </fieldset> 27 <fieldset id="pac_script"> 28 <legend>Automatic Configuration</legend> 29 <input type="radio" name="proxyType" id="proxyTypeAutoconfig" value="autoconfig"> 30 <label for="proxyTypeAutoconfig">Your proxy supports <em>automatic configuration</em>.</label> 31 32 <section> 33 <label for="autoconfigURL">Autoconfiguration URL (PAC file)</label> 34 <input type="url" name="autoconfigURL" id="autoconfigURL"> 35 <input type="hidden" name="autoconfigData" id="autoconfigData"> 36 </section> 37 </fieldset> 38 <fieldset id="fixed_servers"> 39 <legend>Manual Proxy</legend> 40 <input type="radio" name="proxyType" id="proxyTypeManual" value="manual"> 41 <label for="proxyTypeManual">Configure your proxy settings <em>manually</em>.</label> 42 <section> 43 <fieldset> 44 <legend>HTTP</legend> 45 <label for="proxyHostHttp">Host</label> 46 <select id="proxySchemeHttp" name="proxySchemeHttp"> 47 <option selected value="http">http://</option> 48 <option value="https">https://</option> 49 <option value="socks4">socks4://</option> 50 <option value="socks5">socks5://</option> 51 </select> 52 <input type="text" name="proxyHostHttp" id="proxyHostHttp"> 53 54 <label for="proxyPortHttp">Port</label> 55 <input type="number" min="1" step="1" name="proxyPortHttp" id="proxyPortHttp"> 56 57 <input type="checkbox" name="singleProxyForEverything" id="singleProxyForEverything"> 58 <label for="singleProxyForEverything">Use the same proxy server for all protocols</label> 59 </fieldset> 60 <fieldset> 61 <legend>HTTPS</legend> 62 <label for="proxyHostHttps">Host</label> 63 <select id="proxySchemeHttps" name="proxySchemeHttps"> 64 <option selected value="http">http://</option> 65 <option value="https">https://</option> 66 <option value="socks4">socks4://</option> 67 <option value="socks5">socks5://</option> 68 </select> 69 <input type="text" name="proxyHostHttps" id="proxyHostHttps"> 70 71 <label for="proxyPortHttps">Port</label> 72 <input type="number" min="1" step="1" name="proxyPortHttps" id="proxyPortHttps"> 73 </fieldset> 74 <fieldset> 75 <legend>FTP</legend> 76 <label for="proxyHostFtp">Host</label> 77 <select id="proxySchemeFtp" name="proxySchemeFtp"> 78 <option selected value="http">http://</option> 79 <option value="https">https://</option> 80 <option value="socks4">socks4://</option> 81 <option value="socks5">socks5://</option> 82 </select> 83 <input type="text" name="proxyHostFtp" id="proxyHostFtp"> 84 85 <label for="proxyPortFtp">Port</label> 86 <input type="number" min="1" step="1" name="proxyPortFtp" id="proxyPortFtp"> 87 </fieldset> 88 <fieldset> 89 <legend>Fallback</legend> 90 <label for="proxyHostFallback">Host</label> 91 <select id="proxySchemeFallback" name="proxySchemeFallback"> 92 <option selected value="http">http://</option> 93 <option value="https">https://</option> 94 <option value="socks4">socks4://</option> 95 <option value="socks5">socks5://</option> 96 </select> 97 <input type="text" name="proxyHostFallback" id="proxyHostFallback"> 98 99 <label for="proxyPortFallback">Port</label> 100 <input type="number" min="1" step="1" name="proxyPortFallback" id="proxyPortFallback"> 101 </fieldset> 102 <fieldset> 103 <label for="bypassList">Bypass proxy for these hosts:</label> 104 <textarea id="bypassList" name="bypassList" placeholder="localhost,192.168.1.1/16, .example.com"></textarea> 105 </fieldset> 106 </section> 107 </fieldset> 108 <input type="submit" value="Save proxy settings"> 109 </form> 110 </div> 111 <script src="./proxy_form_controller_test.js"></script> 112</body> 113</html> 114