source: Dev/trunk/src/client/dojo/tests/_base/loader/debugConsole.html

Last change on this file was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

File size: 1.4 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2        "http://www.w3.org/TR/html4/strict.dtd">
3<html>
4        <head>
5                <title>testing debugging and logging functions</title>
6                <script type="text/javascript">
7                        djConfig = {};
8                        djConfig.isDebug = document.location.href.match(/\?ON/);
9                </script>
10                <script type="text/javascript" src="../../../dojo.js"></script>
11                <script type="text/javascript">
12                        dojo.addOnLoad(function(){
13                                var toggle = document.getElementById("toggle").innerHTML = djConfig.isDebug?"ON":"OFF";
14                        });
15                       
16                        var aString = "this is my test string";
17                        var anObject = {
18                                aProperty: "aValue",
19                                anotherProperty: "anotherValue",
20                                aNumber: 1234
21                        };
22                       
23                        var cn = ["debug","log",
24                                "assert", "count", "dir", "dirxml", "error", "group",
25                                "groupEnd", "info", "profile", "profileEnd", "time", "timeEnd",
26                                "trace", "warn"
27                        ];
28                        for(var i=0;i<cn.length;i++) {
29                                console[cn[i]]( cn[i] + ": " + aString);
30                                console[cn[i]]( cn[i] + ": " + anObject);
31                        }
32                </script>
33        </head>
34        <body>
35                <p>
36                        Testing console.* methods with djConfig.isDebug turned <span id="toggle"></span>
37                </p>
38                <p>
39                        Append '?ON' to URL to try with djConfig.isDebug turned ON. Remove it to test djConfig.isDebug turned OFF
40                </p>
41                <p>
42                        If isDebug is off (false), then make sure console functions go to a simple empty function. You may see
43                        errors in the console, since console.error is being tested as part of this test.
44                </p>
45        </body>
46</html>
47
Note: See TracBrowser for help on using the repository browser.