-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
html_tests fail after recent WebKit merge #1005
Comments
This comment was originally written by [email protected] Issue #993 has been merged into this issue. |
This comment was originally written by [email protected]
Yes, the new constructor pattern should apply to all events. The up-to-date status is on this bug: <https://bugs.webkit.org/show_bug.cgi?id=67824> This is the meta-bug for removing the init*Event methods: <https://bugs.webkit.org/show_bug.cgi?id=68791> Not all will be removed for backwards compatibility. However there is no reason to expose them via Dart.
I think so: grep WebKit IDLs for the InitializedByEventConstructor attribute. The spec IDLs are nicer because they have a specific argument you can extract the properties of.
Can you give more details on where the overhead is?
This API is always discussed in terms of the init*Event argument lists being too long and cryptic and the argument being an object literal – effectively like named parameters – although it is not a requirement. So I think named parameters make sense. |
Note, this test has been broken into several. The event constructor issues remain. Set owner to @rakudrama. |
Added Fixed label. |
2021-03-17 [email protected] Fixes #1017. Use => for setter returning value tests 2021-03-16 [email protected] Issue #996: more tests for Generic functions as type arguments and bounds added. 2021-03-16 [email protected] Fixes #1005. Description updated for method_definition tests 2021-03-16 [email protected] Fixes #1011. Expect an error if non-function type is called as a function 2021-03-16 [email protected] Issue #996: tests for Generic functions as type arguments and bounds re-factored, more tests added. 2021-03-15 [email protected] Issue #996: tests for Generic functions as type arguments and bounds added. 2021-03-15 [email protected] Issue #996: tests for Generic functions as type arguments and bounds added. 2021-03-15 [email protected] Missed experiment flag added 2021-03-12 [email protected] Issue #996: tests for Generic functions as type arguments and bounds added. 2021-03-12 [email protected] #993. Added tests checking that Struct fields cannot have initializers 2021-03-12 [email protected] #993. Tests for not external members of Struct subtype added 2021-03-11 [email protected] #993. Use package ffi in co19 ffi tests 2021-03-09 [email protected] Fixes #995. Annotations with type arguments tests added 2021-03-09 [email protected] Issue #997: existing triple-shift tests corrected. 2021-03-09 [email protected] More fixes for #535: split constant evaluation tests because static behavior of the strong and weak mode is different. 2021-03-04 [email protected] #993. Array tests added 2021-03-04 [email protected] #993. Pointer equality tests added 2021-03-03 [email protected] #993. Pointer.elementAt() tests added 2021-03-02 [email protected] #993. Pointer.cast() tests added 2021-03-01 [email protected] #993. Pointer tests added 2021-03-01 [email protected] Fixes #936. Change expected result according to the new left top rule 2021-02-26 [email protected] Fixed #998: tests checks output streams correctly now. 2021-02-26 [email protected] #993. IntPtr tests added 2021-02-26 [email protected] #993. More Struct tests added 2021-02-25 [email protected] Tests updated, missing issue tags added. 2021-02-25 [email protected] #1003. Isolate test fixed to not to be a racy 2021-02-25 [email protected] Issue numbers added 2021-02-24 [email protected] Issue number added 2021-02-24 [email protected] #988. Typo in error message fixed 2021-02-24 [email protected] #988. Fix test expectations Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-nnbd-mac-release-x64-try,vm-kernel-nnbd-win-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-x64-try Change-Id: I718644028b1d2a9fbba0c7efdf2923bb67184fde Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191409 Reviewed-by: William Hesse <[email protected]>
… webdev Revisions updated by `dart tools/rev_sdk_deps.dart`. collection (https://github.com/dart-lang/collection/compare/1ed009e..1a9b7eb): 1a9b7eb 2023-08-15 ebraminio Minor typo fix (#304) dartdoc (https://github.com/dart-lang/dartdoc/compare/5cfb1f3..e148373): e1483735 2023-08-14 Parker Lougheed Adjust links to dart.dev class modifier documentation (#3476) http (https://github.com/dart-lang/http/compare/9f167a7..631d4ec): 631d4ec 2023-08-18 Alex James Add java_http .gitattributes file (#999) 58a5462 2023-08-17 Alex James JavaClient can stream the HTTP response body (#1005) df1f625 2023-08-15 Brian Quinlan Add some additional header tests (#1006) mockito (https://github.com/dart-lang/mockito/compare/ff79de6..e54a006): e54a006 2023-08-18 Copybara-Service Merge pull request #685 from LuisDuarte1:feature/build-extensions 5f3a4ca 2023-08-18 Luís Duarte Format files 2d4ec1e 2023-08-17 Luís Duarte Update lib/src/builder.dart bc06f9f 2023-08-17 Luís Duarte Make builder not merge generic extension. af043a0 2023-08-16 Luís Duarte Replace double-quotes with single quotes 034e6c1 2023-08-16 Luís Duarte Update lib/src/builder.dart 4ff995f 2023-08-10 Luís Duarte Make MockBuilder support build_extensions option. protobuf (https://github.com/dart-lang/protobuf/compare/a852ba4..5e8f36b): 5e8f36b 2023-08-16 Ömer Sinan Ağacan Add dart2wasm targets to benchmark builder (#806) 41d0156 2023-08-15 Ömer Sinan Ağacan Document why we add '$' prefix to result local in constructors (#870) 41193fd 2023-08-14 Devon Carew Rename a local variable to avoid proto field name conflicts, re-generate protos (#869) test (https://github.com/dart-lang/test/compare/bc0a992..d0fc4bd): d0fc4bde 2023-08-16 Nate Bosch Extend the timeout for runtime_matrix_test (#2084) cdf80280 2023-08-16 Nate Bosch Add some console logging to browser test startup (#2083) 6146c292 2023-08-16 Nate Bosch Add an ignore for an SDK deprecation (#2082) 27142079 2023-08-15 Parker Lougheed Fix improperly rendered changelog entry (#2081) 46cf4de0 2023-08-15 Nate Bosch Timeout browser suite loads (#2080) tools (https://github.com/dart-lang/tools/compare/295ff92..2be6c2e): 2be6c2e 2023-08-16 Ben Konyi Added `dartCliCommandExecuted` and `pubGet` events (#123) webdev (https://github.com/dart-lang/webdev/compare/19aad27..fc876cb): fc876cb0 2023-08-16 Elliott Brooks Reset Webdev to 3.0.8-wip (#2197) 1aa7c523 2023-08-16 Elliott Brooks Prepare webdev for release to 3.0.7 (#2196) Change-Id: Idc228d0f3f70f5b3e7bfc6e777260dfe84fe96f5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322060 Commit-Queue: Devon Carew <[email protected]> Reviewed-by: Nate Bosch <[email protected]>
DumpRenderTree is built against WebKit. Sometime before r2857 Dartium changed by picking up two changes.
(1) CSSDeclaration.hasOwnProperty returns 'true' for arbitrary arguments. This breaks the dartc wrapping version of dart:dom. This can be fixed with extra checks - that the hash map is present and a valid object.
(2) Some Events have lost their initXXXEvent methods.
104 ERROR Expectation: Event BeforeLoadEvent. Caught NoSuchMethodException - receiver: '' function name: 'initBeforeLoadEvent' arguments: []]
105 ERROR Expectation: Event CloseEvent. Caught NoSuchMethodException - receiver: '' function name: 'initCloseEvent' arguments: []]
108 ERROR Expectation: Event ErrorEvent. Caught NoSuchMethodException - receiver: '' function name: 'initErrorEvent' arguments: []]
114 ERROR Expectation: Event OverflowEvent. Caught NoSuchMethodException - receiver: '' function name: 'initOverflowEvent' arguments: []]
115 ERROR Expectation: Event PageTransitionEvent. Caught NoSuchMethodException - receiver: '' function name: 'initPageTransitionEvent' arguments: []]
116 ERROR Expectation: Event ProgressEvent. Caught NoSuchMethodException - receiver: '' function name: 'initProgressEvent' arguments: []]
122 ERROR Expectation: Event XMLHttpRequestProgressEvent. Caught NoSuchMethodException - receiver: '' function name: 'initProgressEvent' arguments: []]
In JavaScript, instead of creating an event and then calling the initXXXEvent method, the parameters are passed as a dictionary to the constructor.
Before (JS):
var c = document.createEvent('CloseEvent');
c.initCloseEvent('close', false, true, false, 42, 'boogers');
is now in WebKit simply
new CloseEvent('close', {
bubbles: false,
cancelable: true,
wasClean: false,
code: 42,
reason: 'boogers'
});
What is not clear:
(A) Does the new constructor pattern apply to all events, i.e. including events that still have initXXXEvent methods?
(B) Does the IDL contain enough information to generate the constructor automatically?
We need to design the Dart binding and implement it on both Dartium and JavaScript targets.
The JavaScript target is going to have to support both styles since it will be some time before all browsers are consistent. This will incur some unwelcome overhead.
Passing a dictionary does have some advantages - the code can be table-driven.
I suggest first that we use named parameters in the constructor.
Named parameters will have a superior experience in the editor since they will be available for auto-completion.
It appears that in the future an 'invocation mirror' will allow a map to be passed to a function taking named parameters. If that turns out not to work, we can add a named constructor that takes a map:
interface CloseEvent ... {
CloseEvent(
String type,
[bool bubbles = false,
bool cancelable = false,
bool wasClean = false,
int code = 0,
String reason = '']);
CloseEvent.fromMap(String type, Map map); // Optional.
}
This can be called as:
new CloseEvent('close', cancelable: true, code: 42, reason: 'boogers');
new CloseEvent.fromMap('close', {
'bubbles': false,
'cancelable': true,
'wasClean': false,
'code': 42,
'reason': 'boogers'
});
The text was updated successfully, but these errors were encountered: