Mike Welsh
f48182ef3d
core: Add various settings to PlayerBuilder
2022-04-29 09:14:32 -07:00
Mike Welsh
e1e2b1008a
core: Add PlayerBuilder
2022-04-29 09:14:32 -07:00
David Wendt
90da579835
tests: Tests should process events after a frame runs, otherwise we miss some at the start.
2022-04-25 16:29:07 -06:00
David Wendt
d4dc440bb6
tests: Add a basic test for mouse clicks on AS2.
2022-04-25 16:29:07 -06:00
David Wendt
4c8443a464
tests: Add support for `input.json` files next to tests.
...
If the file is missing we treat it as if the file has no events to inject.
2022-04-25 16:29:07 -06:00
David Wendt
06410e97ba
tests: Input files should be `Debug`
2022-04-25 16:29:07 -06:00
David Wendt
e28ecbb647
tests: `InputInjector.next` must actually move up it's position index
2022-04-25 16:29:07 -06:00
David Wendt
952fee4ac0
tests: Add `InputInjector` type for opening and iterating an input file.
2022-04-25 16:29:07 -06:00
David Wendt
ac86dee3a6
tests: Add a library defining the file format for Ruffle test input.
...
I intend to share this code across both Ruffle and FlashTAS (another project that allows running input tests on Flash Player), hence why it's a separate library from Ruffle's tests crate.
2022-04-25 16:29:07 -06:00
relrelb
d27f1fb811
tests: Fix image tests
...
CI was upgraded to use LLVM 14.
Rename image tests (currently only color) to match it.
2022-04-23 00:07:56 -07:00
Mike Welsh
cc9bdaaadb
tests: Add test for sortOn with proto and virtual properties
2022-04-18 08:34:04 -07:00
Mike Welsh
b83879c392
tests: Update reference images
2022-04-15 14:52:33 -07:00
Toad06
65d58f4733
tests: Add tests for `Add`, `Equals`, `Less` and `GetProperty` actions
2022-04-13 22:00:25 -07:00
Mike Welsh
bd144194c3
tests: Add test for bool values in SWFv4
2022-04-10 20:03:39 -07:00
Mike Welsh
3d4d7a0ab5
tests: Add test for division in SWFv4
2022-04-09 23:17:39 -07:00
relrelb
7497fb7008
core: Change `Player::set_root_movie` to accept a `SwfMovie`
...
Move the `Arc::new` to within the function.
2022-04-08 15:16:25 -07:00
dependabot[bot]
2af8c851e2
build(deps): bump pretty_assertions from 1.2.0 to 1.2.1
...
Bumps [pretty_assertions](https://github.com/colin-kiegel/rust-pretty-assertions ) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/colin-kiegel/rust-pretty-assertions/releases )
- [Changelog](https://github.com/colin-kiegel/rust-pretty-assertions/blob/main/CHANGELOG.md )
- [Commits](https://github.com/colin-kiegel/rust-pretty-assertions/compare/v1.2.0...v1.2.1 )
---
updated-dependencies:
- dependency-name: pretty_assertions
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-04 18:43:37 -07:00
Toad06
0aff256c1a
tests: `DefineLocal` also accepts dot and slash paths
2022-04-02 14:30:56 -07:00
relrelb
3a5e94dad2
tests: Expand `mcl_loadclip`
...
Test for invalid data loading.
2022-04-02 12:50:43 -07:00
Aaron Hill
4f23500779
avm2: Implement most of `flash.external.ExternalInterface`
...
This re-uses the logic we have for handling AVM1's `ExternalInterface`.
For now, serialization/deserialization of non-array objects is
left unimplemented.
2022-03-31 22:40:09 -07:00
Mike Welsh
a9aaa0b0de
tests: Add test for Add2 op
2022-03-31 16:57:07 -07:00
dependabot[bot]
e5a3365957
build(deps): bump image from 0.23.14 to 0.24.1
...
Bumps [image](https://github.com/image-rs/image ) from 0.23.14 to 0.24.1.
- [Release notes](https://github.com/image-rs/image/releases )
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md )
- [Commits](https://github.com/image-rs/image/commits )
---
updated-dependencies:
- dependency-name: image
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-30 08:55:55 +03:00
Mike Welsh
02fe467bd2
tests: Reduce epsilon for autosize tests
2022-03-29 22:22:32 -07:00
Mike Welsh
f0836eb7fa
tests: Add test for String(function) to string_coercion
2022-03-28 19:07:12 -07:00
Mike Welsh
bda8db5a34
tests: Add Object < Object tests to lessthan2 tests
2022-03-28 19:07:12 -07:00
Mike Welsh
02a66e938c
tests: Unignore avm1 string_coercion test
2022-03-28 19:07:12 -07:00
David Wendt
d38e5e166b
tests: Add regression tests for image loading
2022-03-27 18:55:38 -07:00
relrelb
161071e8c4
core: Re-implement `NullExecutor`
...
Make it a thin abstraction layer over either the `futures` or `wasm-bindgen-futures`
crates, as already done in `render/wgpu/src/uniform_buffer.rs`,
instead of a hand-made single-thread executor.
Ideally this would also be usable on desktop, but I didn't manage to
get `LocalPool` working with `winit` (it needs to post a task to the
`EventLoopProxy` as a wake procedure).
2022-03-26 10:03:42 -07:00
relrelb
bee70c99de
tests: Expand `xml_to_string`
...
Test that a set `nodeName` is included in the final string
representation.
2022-03-19 16:31:24 -07:00
relrelb
bac6f50fa3
tests: Expand `xml_append_child`
...
Test that document roots can be appended as children.
2022-03-19 16:31:24 -07:00
relrelb
031126a1b8
core: Remove `LocaleBackend`
...
Previously there were 3 implementations of `LocaleBackend`:
`DesktopLocaleBackend`, `WebLocaleBackend` and `NullLocaleBackend`.
While `DesktopLocaleBackend`, `WebLocaleBackend` were identical,
`NullLocaleBackend` always returned a fixed date/time for tests
determinism.
Unify them in a single file, and use `cfg!(test)` and a new dedicated
`deterministic` feature to decide whether to mock date/time or not.
This should not cause any behavioral changes.
2022-03-16 19:57:53 +02:00
dependabot[bot]
50ab1e6130
build(deps): bump pretty_assertions from 1.1.0 to 1.2.0
...
Bumps [pretty_assertions](https://github.com/colin-kiegel/rust-pretty-assertions ) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/colin-kiegel/rust-pretty-assertions/releases )
- [Changelog](https://github.com/colin-kiegel/rust-pretty-assertions/blob/main/CHANGELOG.md )
- [Commits](https://github.com/colin-kiegel/rust-pretty-assertions/commits )
---
updated-dependencies:
- dependency-name: pretty_assertions
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 22:35:54 +02:00
relrelb
95a0ef993b
tests: Merge `roots_and_levels` into `stage_object_children`
...
And add some more cases along the way.
2022-03-12 16:48:55 +02:00
relrelb
efc60094a5
tests: Expand `transform`
2022-03-12 15:59:05 +02:00
relrelb
d8df22fab0
tests: Add `is_finite`
...
Based on `as3_is_finite`.
2022-03-06 23:15:18 +01:00
dependabot[bot]
4e2f7b02fc
build(deps): bump futures from 0.3.19 to 0.3.21
...
Bumps [futures](https://github.com/rust-lang/futures-rs ) from 0.3.19 to 0.3.21.
- [Release notes](https://github.com/rust-lang/futures-rs/releases )
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.19...0.3.21 )
---
updated-dependencies:
- dependency-name: futures
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-02-13 19:44:57 +02:00
dependabot[bot]
4a90d5f7ad
build(deps): bump pretty_assertions from 1.0.0 to 1.1.0
...
Bumps [pretty_assertions](https://github.com/colin-kiegel/rust-pretty-assertions ) from 1.0.0 to 1.1.0.
- [Release notes](https://github.com/colin-kiegel/rust-pretty-assertions/releases )
- [Changelog](https://github.com/colin-kiegel/rust-pretty-assertions/blob/main/CHANGELOG.md )
- [Commits](https://github.com/colin-kiegel/rust-pretty-assertions/compare/v1.0.0...v1.1.0 )
---
updated-dependencies:
- dependency-name: pretty_assertions
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-02-13 17:02:18 +02:00
relrelb
26025a0446
tests: Expand `register_class` and `register_class_swf6`
2022-02-10 07:58:30 +02:00
TÖRÖK Attila
81c8f040fa
tests: Adjust avm2/edittext_leading for the updated fake device font
2022-02-09 20:09:52 +01:00
Adrian Wielgosik
9059e199e2
avm2: Add tests for class calling
2022-02-07 00:49:00 +01:00
TÖRÖK Attila
43b21e5d4d
chore: Bump approx to 0.5.1, remove clippy lint suppressions
2022-01-25 18:34:35 -08:00
Mike Welsh
3e9f9741ea
tests: Edit funky_function_calls to test undefined this
...
Test `this` instead of `this == other_this` to verify when it is
indeed an unboxed undefined.
2022-01-24 02:04:57 -08:00
Mike Welsh
d9bedffb9f
tests: Add tests for Object-to-String coercion
2022-01-23 17:19:09 -08:00
David Wendt
c42984a990
avm2: Implement `MouseEvent.toString`.
...
This also rearranges some things about how we construct events, because `MouseEvent` has different defaults from `Event`. When we finally support parameter metadata on methods we should remove that code.
We also remove the `value_of` code on `EventObject` as that was a mistake. Events don't do anything special in there and I misinterpreted the test results the first time around.
2022-01-22 19:58:32 -08:00
David Wendt
59d735a034
tests: Add a test for `MouseEvent.stageX`/`stageY`
2022-01-22 19:58:32 -08:00
David Wendt
69c66fe720
tests: Add a test of `MouseEvent`'s constructor
2022-01-22 19:58:32 -08:00
Mike Welsh
e11e1e870f
avm1: Improve Object comparisons in SWFv5
...
SWFv5 always calls `Object.valueOf` at least once and sometimes
twice in the Equals2 op, even when comparing two Objects.
For example, `Object(1) == Object(1)` is true in SWFv5 but false
in SWFv6.
2022-01-21 16:40:19 -08:00
Mike Welsh
bf599d9107
avm1: Clean up Value::abstract_eq
...
Consolidate several cases and fix some issues:
* Object-to-primitive comparison always goes through `valueOf`.
* `Object(undefined) == undefined` is true; this will coerce
to a bare object with no `valueOf`, resulting in
`undefined==undefined`.
* `{valueOf:function() { return NaN; }} == NaN` is true.
2022-01-21 16:40:19 -08:00
Mike Welsh
4d8db1e64d
avm1: Fix function closures inside `with`
...
When creating a scope for a closure, any `with` scopes were being
filtered out, but this was incorrect; `with` scopes are still on
the scope chain when the function is called.
2022-01-19 20:29:26 -08:00
Adrian Wielgosik
5358940774
avm2: Support basic string.replace
...
Supports:
- string.replace(string, string)
- string.replace(regex, simple_string)
Does not support:
- string.replace(regex, string_with_replacement_codes)
- string.replace(any, function)
2022-01-17 20:10:20 -08:00