mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-23 17:07:31 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
67
dom/tests/mochitest/general/test_consoleAPI.html
Normal file
67
dom/tests/mochitest/general/test_consoleAPI.html
Normal file
|
|
@ -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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue