[refactor] More post-NSS WebCrypto cleanups (utility functions).
[chromium-blink-merge.git] / content / test / data / simple_links.html
blobe5206796c18df919716a7dd710559cfc0d052011
1 <html>
3 <head><title>Simple links</title>
4 <script>
5 function simulateClick(target) {
6 var evt = document.createEvent("MouseEvents");
7 evt.initMouseEvent("click", true, true, window,
8 0, 0, 0, 0, 0, false, false,
9 false, false, 0, null);
11 return target.dispatchEvent(evt);
14 function setPortNumber(portNumber) {
15 var link = document.getElementById("cross_site_link");
16 link.setAttribute("href", "http://foo.com:" + portNumber + "/title2.html");
17 return true;
20 function clickSameSiteLink() {
21 return simulateClick(document.getElementById("same_site_link"));
24 function clickCrossSiteLink() {
25 return simulateClick(document.getElementById("cross_site_link"));
27 </script>
28 </head>
30 <a href="title2.html" id="same_site_link">same-site</a><br>
31 <a href="http://foo.com/title2.html" id="cross_site_link">cross-site</a><br>
33 </html>