| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" |
|---|
| 2 | "http://www.w3.org/TR/html4/strict.dtd"> |
|---|
| 3 | |
|---|
| 4 | <title>tooltip test</title> |
|---|
| 5 | |
|---|
| 6 | <style> |
|---|
| 7 | th { background: #ccccff; } |
|---|
| 8 | td { align: left; } |
|---|
| 9 | </style> |
|---|
| 10 | |
|---|
| 11 | <script type="text/javascript"> djConfig = { isDebug: true }; </script> |
|---|
| 12 | <script type="text/javascript" src="../dojo.js"></script> |
|---|
| 13 | <script> |
|---|
| 14 | dojo.require("dojo.event.*"); |
|---|
| 15 | dojo.require("dojo.widget.Tooltip"); |
|---|
| 16 | dojo.require("dojo.widget.Button"); |
|---|
| 17 | </script> |
|---|
| 18 | |
|---|
| 19 | <script type="text/javascript"> |
|---|
| 20 | |
|---|
| 21 | oldTime = new Date(); |
|---|
| 22 | dojo.addOnLoad(function(){ |
|---|
| 23 | var time = new Date().getTime() - oldTime; |
|---|
| 24 | var p = document.createElement("p"); |
|---|
| 25 | p.appendChild(document.createTextNode("Widgets loaded in " + time + "ms")); |
|---|
| 26 | document.getElementById("results").appendChild(p); |
|---|
| 27 | }); |
|---|
| 28 | |
|---|
| 29 | </script> |
|---|
| 30 | |
|---|
| 31 | <h1>Test of instantiating many tooltips</h1> |
|---|
| 32 | |
|---|
| 33 | <p> |
|---|
| 34 | <strong style="color:red">Warning:</strong> these benchmarks will take a number of seconds to run. Other system activity will cause these benchmarks to skew. |
|---|
| 35 | </p> |
|---|
| 36 | |
|---|
| 37 | <p> |
|---|
| 38 | The results should not be compared between browsers for they are run on different systems, |
|---|
| 39 | however results for the same browser are relative to each other. |
|---|
| 40 | </p> |
|---|
| 41 | |
|---|
| 42 | <? for($i=0;$i<100;$i++){ ?> |
|---|
| 43 | <span id="span<?=$i?>" class="tt"><?=$i?></span> |
|---|
| 44 | <span dojoType="tooltip" connectId="span<?=$i?>"> |
|---|
| 45 | <h3>Tooltip for "<?=$i?>" text</h3> |
|---|
| 46 | <b> |
|---|
| 47 | <span style="color: blue;">rich formatting</span> |
|---|
| 48 | <span style="color: red; font-size: x-large;"><i>!</i></span> |
|---|
| 49 | </b> |
|---|
| 50 | <button dojoType="Button">Hello</button> |
|---|
| 51 | </span> |
|---|
| 52 | <? } ?> |
|---|
| 53 | |
|---|
| 54 | |
|---|
| 55 | <h2>Result</h2> |
|---|
| 56 | <div id="results"></div> |
|---|
| 57 | |
|---|
| 58 | <h2>Typical results</h2> |
|---|
| 59 | <table border=1> |
|---|
| 60 | <thead> |
|---|
| 61 | <tr> |
|---|
| 62 | <th>IE |
|---|
| 63 | <th>Safari |
|---|
| 64 | <th>Gecko (on PC) |
|---|
| 65 | <th>Gecko (on intel mac) |
|---|
| 66 | </tr> |
|---|
| 67 | </thead> |
|---|
| 68 | <tbody> |
|---|
| 69 | <tr> |
|---|
| 70 | <td>4890 |
|---|
| 71 | <td>3242 |
|---|
| 72 | <td>3094 |
|---|
| 73 | <td>3782 |
|---|
| 74 | </tr> |
|---|
| 75 | </tbody> |
|---|
| 76 | </table> |
|---|