]> dev.renevier.net Git - syp.git/blob - openlayers/tests/Console.html
initial commit
[syp.git] / openlayers / tests / Console.html
1 <html>
2 <head>
3   <script src="../lib/OpenLayers.js"></script>
4   <script type="text/javascript">
5     function test_Console(t) {
6         
7         /**
8          * These tests only assure that OpenLayers works when not
9          * in debug mode.  It means that calls to OpenLayers.Console
10          * will not do anything in this case.  When OpenLayers is in
11          * debug mode, we assume that the Firebug extension or Firebug Lite
12          * works as advertised.
13          */
14         
15         // supported OpenLayers.Console methods
16         var methods = ['log', 'debug', 'info', 'warn', 'error', 'assert',
17                'dir', 'dirxml', 'trace', 'group', 'groupEnd', 'time',
18                'timeEnd', 'profile', 'profileEnd', 'count'];
19
20         t.plan(methods.length * 2);
21
22         var nothing, method;
23         for(var i=0; i<methods.length; ++i) {
24             method = OpenLayers.Console[methods[i]];
25             t.ok(method,
26                  "OpenLayers.Console." + methods[i] + " exists");
27             nothing = OpenLayers.Console[methods[i]]();
28             t.eq(nothing, null,
29                  "OpenLayers.Console." + methods[i] + "() " +
30                  "call is harmless when not in debug mode");
31         }
32
33     }
34
35   </script>
36 </head>
37 <body>
38 </body>
39 </html>