summaryrefslogtreecommitdiffstats
path: root/webkit/data/plugin_tests/npapi.js
blob: 207d188b549fdac50f3b2ad73dbcc5917d2af785 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//
// This script provides some mechanics for testing NPAPI
//

/* public */ function onSuccess(name, id)
{
  setTimeout(onFinished, 0, name, id, "OK");
}

/* public */ function onFailure(name, id, status)
{
  setTimeout(onFinished, 0, name, id, status);
}



// Finish running a test by setting the status 
// and the cookie.
/* private */ function onFinished(name, id, result)
{
  var statusPanel = document.getElementById("statusPanel");
  if (statusPanel) {
    statusPanel.innerHTML = result;
  }

  var cookie = name + "." + id + ".status=" + result + "; path=/";
  document.cookie = cookie;
}