mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1071177 - Test
This commit is contained in:
parent
5601d3a0c1
commit
38d0b6e5f6
@ -115,6 +115,21 @@ function xray_test()
|
||||
sendSyncMessage("cpows:xray_test", {}, {element: element});
|
||||
}
|
||||
|
||||
function symbol_test()
|
||||
{
|
||||
let iterator = Symbol.iterator;
|
||||
let named = Symbol.for("cpow-test");
|
||||
// let unique = Symbol();
|
||||
|
||||
let object = {
|
||||
[iterator]: iterator,
|
||||
[named]: named,
|
||||
// [unique]: unique,
|
||||
// "unique": unique
|
||||
};
|
||||
sendSyncMessage("cpows:symbol_test", {}, object);
|
||||
}
|
||||
|
||||
// Parent->Child references should go X->parent.privilegedJunkScope->child.privilegedJunkScope->Y
|
||||
// Child->Parent references should go X->child.privilegedJunkScope->parent.unprivilegedJunkScope->Y
|
||||
function compartment_test()
|
||||
|
@ -205,6 +205,13 @@
|
||||
is(element.foo, undefined, "DOM element does not expose content properties");
|
||||
}
|
||||
|
||||
function recvSymbolTest(message) {
|
||||
let object = message.objects;
|
||||
is(object[Symbol.iterator], Symbol.iterator, "Should use Symbol.iterator");
|
||||
is(Symbol.keyFor(object[Symbol.for("cpow-test")]), "cpow-test", "Symbols aren't registered correctly");
|
||||
// is(object.unique, object[object.unique], "Unique symbols as ids and values don't seem to work");
|
||||
}
|
||||
|
||||
let systemGlobal = this;
|
||||
function recvCompartmentTest(message) {
|
||||
let getUnprivilegedObject = message.objects.getUnprivilegedObject;
|
||||
@ -300,6 +307,7 @@
|
||||
mm.addMessageListener("cpows:dom_test", recvDomTest);
|
||||
mm.addMessageListener("cpows:dom_test_after_gc", recvDomTestAfterGC);
|
||||
mm.addMessageListener("cpows:xray_test", recvXrayTest);
|
||||
mm.addMessageListener("cpows:symbol_test", recvSymbolTest);
|
||||
mm.addMessageListener("cpows:compartment_test", recvCompartmentTest);
|
||||
mm.addMessageListener("cpows:regexp_test", recvRegExpTest);
|
||||
mm.addMessageListener("cpows:lifetime_test_1", recvLifetimeTest1);
|
||||
|
Loading…
Reference in New Issue
Block a user