1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/components/satchel/test/subtst_form_submission_1.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,38 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 + 1.7 +<head> 1.8 +</head> 1.9 + 1.10 +<body> 1.11 + 1.12 +<form id="subform1" onsubmit="return checkSubmit(21)"> 1.13 + <input id="subtest1" type="text" name="subtest1"> 1.14 + <button type="submit">Submit</button> 1.15 +</form> 1.16 + 1.17 +<form id="subform2" onsubmit="return checkSubmit(100)"> 1.18 + <input id="subtest2" type="text" name="subtest2"> 1.19 + <button type="submit">Submit</button> 1.20 +</form> 1.21 + 1.22 +<script> 1.23 + function checkSubmit(num) { 1.24 + netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); 1.25 + return parent.checkSubmit(num); 1.26 + } 1.27 + 1.28 + function clickButton(num) { 1.29 + if (num == 21) 1.30 + document.querySelectorAll("button")[0].click(); 1.31 + else if (num == 100) 1.32 + document.querySelectorAll("button")[1].click(); 1.33 + } 1.34 + 1.35 + // set the input's value (can't use a default value, as satchel will ignore it) 1.36 + document.getElementById("subtest1").value = "subtestValue"; 1.37 + document.getElementById("subtest2").value = "subtestValue"; 1.38 +</script> 1.39 + 1.40 +</body> 1.41 +</html>