mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-28 11:27:32 +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
62
dom/events/test/test_dom_storage_event.html
Normal file
62
dom/events/test/test_dom_storage_event.html
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test for DOM StorageEvent</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
|
||||
const kTests = [
|
||||
{ createEventArg: "StorageEvent",
|
||||
type: "aaa", bubbles: true, cancelable: true,
|
||||
key: null, oldValue: 'a', newValue: 'b', url: 'c', storageArea: null },
|
||||
|
||||
{ createEventArg: "storageevent",
|
||||
type: "bbb", bubbles: false, cancelable: true,
|
||||
key: 'key', oldValue: null, newValue: 'b', url: 'c', storageArea: null },
|
||||
|
||||
{ createEventArg: "Storageevent",
|
||||
type: "ccc", bubbles: true, cancelable: false,
|
||||
key: 'key', oldValue: 'a', newValue: null, url: 'c', storageArea: null },
|
||||
|
||||
{ createEventArg: "storageEvent",
|
||||
type: "ddd", bubbles: false, cancelable: false,
|
||||
key: 'key', oldValue: 'a', newValue: 'b', url: null, storageArea: null },
|
||||
|
||||
{ createEventArg: "StorageEvent",
|
||||
type: "eee", bubbles: true, cancelable: true,
|
||||
key: 'key', oldValue: 'a', newValue: 'b', url: 'c', storageArea: null },
|
||||
|
||||
{ createEventArg: "storageevent",
|
||||
type: "fff", bubbles: false, cancelable: true,
|
||||
key: null, oldValue: null, newValue: null, url: null, storageArea: null },
|
||||
];
|
||||
|
||||
for (var i = 0; i < kTests.length; i++) {
|
||||
var description = "test, Index: " + i + ", ";
|
||||
const kTest = kTests[i];
|
||||
var e = document.createEvent(kTest.createEventArg);
|
||||
e.initStorageEvent(kTest.type, kTest.bubbles, kTest.cancelable,
|
||||
kTest.key, kTest.oldValue, kTest.newValue, kTest.url,
|
||||
kTest.storageArea);
|
||||
|
||||
for (var attr in kTest) {
|
||||
if (attr == 'createEventArg')
|
||||
continue;
|
||||
|
||||
is(e[attr], kTest[attr], description + attr + " returns wrong value");
|
||||
}
|
||||
is(e.isTrusted, false, description + "isTrusted returns wrong value");
|
||||
}
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue