mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:17:35 +00:00
LibWeb: Add support for LegacyWindowAlias IDL extended attribute
This commit is contained in:
parent
cfcc459140
commit
c1ba3e5fa9
4 changed files with 64 additions and 6 deletions
|
@ -0,0 +1,5 @@
|
|||
1. true
|
||||
2. {"a":1,"b":0,"c":0,"d":1,"e":0,"f":0,"m11":1,"m12":0,"m13":0,"m14":0,"m21":0,"m22":1,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":0,"m42":0,"m43":0,"m44":1,"is2D":true,"isIdentity":true}
|
||||
3. true
|
||||
4. true
|
||||
5. "[object DOMMatrix]"
|
33
Tests/LibWeb/Text/input/geometry/legacy-window-alias.html
Normal file
33
Tests/LibWeb/Text/input/geometry/legacy-window-alias.html
Normal file
|
@ -0,0 +1,33 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
let testCounter = 1;
|
||||
function testPart(part) {
|
||||
println(`${testCounter++}. ${JSON.stringify(part())}`);
|
||||
}
|
||||
|
||||
// 1. Compare constructors
|
||||
testPart(() => WebKitCSSMatrix === DOMMatrix);
|
||||
|
||||
// 2. Use alias constructor
|
||||
testPart(() => new WebKitCSSMatrix());
|
||||
|
||||
// 3. Check alias constructor
|
||||
testPart(() => {
|
||||
const m = new WebKitCSSMatrix();
|
||||
return m.constructor === DOMMatrix;
|
||||
});
|
||||
|
||||
// 4. Check constructor for alias
|
||||
testPart(() => {
|
||||
const m = new DOMMatrix();
|
||||
return m.constructor === WebKitCSSMatrix;
|
||||
});
|
||||
|
||||
// 5. Stringify alias constructor
|
||||
testPart(() => {
|
||||
const m = new WebKitCSSMatrix();
|
||||
return {}.toString.call(m);
|
||||
});
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue