summaryrefslogtreecommitdiffstats
path: root/dom/tests/mochitest/general/test_consoleAPI.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/mochitest/general/test_consoleAPI.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/mochitest/general/test_consoleAPI.html')
-rw-r--r--dom/tests/mochitest/general/test_consoleAPI.html67
1 files changed, 67 insertions, 0 deletions
diff --git a/dom/tests/mochitest/general/test_consoleAPI.html b/dom/tests/mochitest/general/test_consoleAPI.html
new file mode 100644
index 000000000..8d710a51a
--- /dev/null
+++ b/dom/tests/mochitest/general/test_consoleAPI.html
@@ -0,0 +1,67 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>window.console test</title>
+ <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
+</head>
+
+<body id="body">
+
+<script type="application/javascript;version=1.8">
+
+function doTest() {
+ ok(window.console, "console exists");
+
+ try {
+ ok(!console.foo, "random property doesn't throw");
+ } catch (ex) {
+ ok(false, "random property threw: " + ex);
+ }
+
+ var expectedProps = {
+ "log": "function",
+ "info": "function",
+ "warn": "function",
+ "error": "function",
+ "exception": "function",
+ "debug": "function",
+ "trace": "function",
+ "dir": "function",
+ "group": "function",
+ "groupCollapsed": "function",
+ "groupEnd": "function",
+ "time": "function",
+ "timeEnd": "function",
+ "profile": "function",
+ "profileEnd": "function",
+ "assert": "function",
+ "count": "function",
+ "table": "function",
+ "clear": "function",
+ "dirxml": "function",
+ "markTimeline": "function",
+ "timeline": "function",
+ "timelineEnd": "function",
+ "timeStamp": "function",
+ };
+
+ var foundProps = 0;
+ for (var prop in console) {
+ foundProps++;
+ is(typeof(console[prop]), expectedProps[prop], "expect console prop " + prop + " exists");
+ }
+ is(foundProps, Object.keys(expectedProps).length, "found correct number of properties");
+
+ SimpleTest.finish();
+}
+
+SimpleTest.waitForExplicitFinish();
+addLoadEvent(doTest);
+
+</script>
+
+<p id="display"></p>
+
+</body>
+</html>