| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <body> | |
| 3 <pre id="console"></pre> | |
| 4 <embed id="plg" type="application/x-webkit-test-netscape"></embed> | |
| 5 <script> | |
| 6 function log(message) | |
| 7 { | |
| 8 document.getElementById("console").appendChild(document.createTextNo
de(message + "\n")); | |
| 9 } | |
| 10 | |
| 11 if (window.testRunner) | |
| 12 testRunner.dumpAsText(); | |
| 13 | |
| 14 var plugin = document.getElementById("plg"); | |
| 15 | |
| 16 var pass = true; | |
| 17 | |
| 18 var firstOneID = plugin.testGetIntIdentifier(1); | |
| 19 var firstZeroID = plugin.testGetIntIdentifier(0); | |
| 20 var firstMinusOneID = plugin.testGetIntIdentifier(-1); | |
| 21 | |
| 22 if (firstOneID == firstZeroID) { | |
| 23 log ("FAIL: getIntIdentifier(1) and getIntIdentifier(0) returned the
same identifier: " + firstOneID); | |
| 24 pass = false; | |
| 25 } | |
| 26 | |
| 27 if (firstOneID == firstMinusOneID) { | |
| 28 log ("FAIL: getIntIdentifier(1) and getIntIdentifier(-1) returned th
e same identifier: " + firstOneID); | |
| 29 pass = false; | |
| 30 } | |
| 31 | |
| 32 if (firstMinusOneID == firstZeroID) { | |
| 33 log ("FAIL: getIntIdentifier(0) and getIntIdentifier(-1) returned th
e same identifier: " + firstZeroID); | |
| 34 pass = false; | |
| 35 } | |
| 36 | |
| 37 var secondOneID = plugin.testGetIntIdentifier(1); | |
| 38 var secondZeroID = plugin.testGetIntIdentifier(0); | |
| 39 var secondMinusOneID = plugin.testGetIntIdentifier(-1); | |
| 40 | |
| 41 if (firstOneID != secondOneID) { | |
| 42 log("FAIL: getIntIdentifier(1) returned " + firstOneID + " the first
time and " + secondOneID + " the second time."); | |
| 43 pass = false; | |
| 44 } | |
| 45 | |
| 46 if (firstZeroID != secondZeroID) { | |
| 47 log("FAIL: getIntIdentifier(0) returned " + firstZeroID + " the firs
t time and " + secondZeroID + " the second time."); | |
| 48 pass = false; | |
| 49 } | |
| 50 | |
| 51 if (firstMinusOneID != secondMinusOneID) { | |
| 52 log("FAIL: getIntIdentifier(-1) returned " + firstMinusOneID + " the
first time and " + secondMinusOneID + " the second time."); | |
| 53 pass = false; | |
| 54 } | |
| 55 | |
| 56 if (pass) | |
| 57 log("PASS: getIntIdentifier(n) returned consistent identifiers for n
= 1, 0 and -1."); | |
| 58 | |
| 59 </script> | |
| 60 </body> | |
| 61 </html> | |
| OLD | NEW |