summaryrefslogtreecommitdiffstats
path: root/dom/tests/browser/test-console-api.html
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /dom/tests/browser/test-console-api.html
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/tests/browser/test-console-api.html')
-rw-r--r--dom/tests/browser/test-console-api.html75
1 files changed, 75 insertions, 0 deletions
diff --git a/dom/tests/browser/test-console-api.html b/dom/tests/browser/test-console-api.html
new file mode 100644
index 000000000..4e7d75708
--- /dev/null
+++ b/dom/tests/browser/test-console-api.html
@@ -0,0 +1,75 @@
+<!DOCTYPE HTML>
+<html dir="ltr" xml:lang="en-US" lang="en-US"><head>
+ <title>Console API test page</title>
+ <script type="text/javascript">
+ window.foobar585956c = function(a) {
+ console.trace();
+ return a+"c";
+ };
+
+ function foobar585956b(a) {
+ return foobar585956c(a+"b");
+ }
+
+ function foobar585956a(omg) {
+ return foobar585956b(omg + "a");
+ }
+
+ function foobar646025(omg) {
+ console.log(omg, "o", "d");
+ }
+
+ function startTimer(timer) {
+ console.time(timer);
+ }
+
+ function stopTimer(timer) {
+ console.timeEnd(timer);
+ }
+
+ function namelessTimer() {
+ console.time();
+ console.timeEnd();
+ }
+
+ function test() {
+ var str = "Test Message."
+ console.foobar(str); // if this throws, we don't execute following funcs
+ console.log(str);
+ console.info(str);
+ console.warn(str);
+ console.error(str);
+ console.exception(str);
+ console.assert(false, str);
+ console.count(str);
+ }
+
+ function testGroups() {
+ console.groupCollapsed("a", "group");
+ console.group("b", "group");
+ console.groupEnd("b", "group");
+ }
+
+ function nativeCallback() {
+ new Promise(function(resolve, reject) { resolve(42); }).then(console.log.bind(console));
+ }
+
+ function timeStamp(val) {
+ console.timeStamp(val);
+ }
+ </script>
+ </head>
+ <body>
+ <h1>Console API Test Page</h1>
+ <button onclick="test();">Log stuff</button>
+ <button id="test-trace" onclick="foobar585956a('omg');">Test trace</button>
+ <button id="test-location" onclick="foobar646025('omg');">Test location</button>
+ <button id="test-nativeCallback" onclick="nativeCallback();">Test nativeCallback</button>
+ <button id="test-groups" onclick="testGroups();">Test groups</button>
+ <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>
+ <button id="test-timeStamp" onclick="timeStamp('!!!')">Test timeStamp</button>
+ <button id="test-emptyTimeStamp" onclick="timeStamp();">Test emptyTimeStamp</button>
+ </body>
+</html>