1 // 2 // This script provides some mechanics for testing NPAPI 3 // 4 5 /* public */ function onSuccess(name, id) 6 { 7 setTimeout(onFinished, 0, name, id, "OK"); 8 } 9 10 /* public */ function onFailure(name, id, status) 11 { 12 setTimeout(onFinished, 0, name, id, status); 13 } 14 15 16 17 // Finish running a test by setting the status 18 // and the cookie. 19 /* private */ function onFinished(name, id, result) 20 { 21 var statusPanel = document.getElementById("statusPanel"); 22 if (statusPanel) { 23 statusPanel.innerHTML = result; 24 } 25 26 if (result == "OK") 27 document.title = "OK"; 28 else 29 document.title = "FAIL"; 30 } 31