2010-11-09 12:19:19 -08:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html dir="ltr" xml:lang="en-US" lang="en-US"><head>
|
|
|
|
<title>Console API test page</title>
|
|
|
|
<script type="text/javascript">
|
2011-04-11 10:48:15 -07:00
|
|
|
window.foobar585956c = function(a) {
|
|
|
|
console.trace();
|
|
|
|
return a+"c";
|
|
|
|
};
|
|
|
|
|
|
|
|
function foobar585956b(a) {
|
|
|
|
return foobar585956c(a+"b");
|
|
|
|
}
|
|
|
|
|
|
|
|
function foobar585956a(omg) {
|
|
|
|
return foobar585956b(omg + "a");
|
|
|
|
}
|
|
|
|
|
2011-05-12 05:29:17 -07:00
|
|
|
function foobar646025(omg) {
|
|
|
|
console.log(omg, "o", "d");
|
|
|
|
}
|
|
|
|
|
2011-05-31 23:33:22 -07:00
|
|
|
function startTimer(timer) {
|
|
|
|
console.time(timer);
|
|
|
|
}
|
|
|
|
|
|
|
|
function stopTimer(timer) {
|
|
|
|
console.timeEnd(timer);
|
|
|
|
}
|
|
|
|
|
|
|
|
function namelessTimer() {
|
|
|
|
console.time();
|
|
|
|
console.timeEnd();
|
|
|
|
}
|
|
|
|
|
2010-11-09 12:19:19 -08:00
|
|
|
function test() {
|
|
|
|
var str = "Test Message."
|
2010-12-10 09:28:17 -08:00
|
|
|
console.foobar(str); // if this throws, we don't execute following funcs
|
2010-11-09 12:19:19 -08:00
|
|
|
console.log(str);
|
|
|
|
console.info(str);
|
|
|
|
console.warn(str);
|
|
|
|
console.error(str);
|
2013-12-02 11:12:18 -08:00
|
|
|
console.exception(str);
|
2010-11-09 12:19:19 -08:00
|
|
|
}
|
2011-06-14 04:38:11 -07:00
|
|
|
|
|
|
|
function testGroups() {
|
|
|
|
console.groupCollapsed("a", "group");
|
|
|
|
console.group("b", "group");
|
|
|
|
console.groupEnd("b", "group");
|
|
|
|
}
|
2013-08-19 06:13:47 -07:00
|
|
|
|
|
|
|
function nativeCallback() {
|
|
|
|
SpecialPowers.pushPrefEnv({"set": [["dom.promise.enabled", true]]}, function() {
|
2013-09-11 09:03:04 -07:00
|
|
|
new Promise(function(resolve, reject) { resolve(42); }).then(console.log);
|
2013-08-19 06:13:47 -07:00
|
|
|
});
|
|
|
|
}
|
2010-11-09 12:19:19 -08:00
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<h1>Console API Test Page</h1>
|
|
|
|
<button onclick="test();">Log stuff</button>
|
2011-04-11 10:48:15 -07:00
|
|
|
<button id="test-trace" onclick="foobar585956a('omg');">Test trace</button>
|
2011-05-12 05:29:17 -07:00
|
|
|
<button id="test-location" onclick="foobar646025('omg');">Test location</button>
|
2013-08-19 06:13:47 -07:00
|
|
|
<button id="test-nativeCallback" onclick="nativeCallback();">Test nativeCallback</button>
|
2011-06-14 04:38:11 -07:00
|
|
|
<button id="test-groups" onclick="testGroups();">Test groups</button>
|
2011-05-31 23:33:22 -07:00
|
|
|
<button id="test-time" onclick="startTimer('foo');">Test time</button>
|
|
|
|
<button id="test-timeEnd" onclick="stopTimer('foo');">Test timeEnd</button>
|
|
|
|
<button id="test-namelessTimer" onclick="namelessTimer();">Test namelessTimer</button>
|
2010-11-09 12:19:19 -08:00
|
|
|
</body>
|
|
|
|
</html>
|