Bug 216428 - Send TestRendered event after running a test but before dumping
Summary: Send TestRendered event after running a test but before dumping
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Darin Adler
URL:
Keywords: InRadar
Depends on: 216440
Blocks:
  Show dependency treegraph
 
Reported: 2020-09-11 18:05 PDT by Darin Adler
Modified: 2020-09-12 23:22 PDT (History)
9 users (show)

See Also:


Attachments
Patch (43.36 KB, patch)
2020-09-11 20:34 PDT, Darin Adler
sam: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch to disable the precompiled header for WinCairo DRT and WTR (1.63 KB, patch)
2020-09-12 18:53 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (47.12 KB, patch)
2020-09-12 22:06 PDT, Darin Adler
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (47.91 KB, patch)
2020-09-12 22:10 PDT, Darin Adler
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Darin Adler 2020-09-11 20:34:50 PDT
Created attachment 408584 [details]
Patch
Comment 2 Darin Adler 2020-09-11 20:35:52 PDT
This sends the event. Might need to refine this later to make sure we force rendering twice the way the WPT documentation suggests; doing that unconditionally would probably slow down test running.
Comment 3 Alexey Proskuryakov 2020-09-11 20:40:09 PDT
I was about to say that there were iOS expectations to remove too, but there aren't. Not sure what happened.
Comment 4 Sam Weinig 2020-09-12 10:05:54 PDT
Comment on attachment 408584 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=408584&action=review

> Tools/TestRunnerShared/Bindings/JSBasics.h:38
> +JSValueRef JSValueMakeBooleanOrNull(JSContextRef, Optional<bool>);
> +Optional<bool> JSValueToNullableBoolean(JSContextRef, JSValueRef);
> +
> +JSValueRef JSValueMakeStringOrNull(JSContextRef, JSStringRef);

Since you are just moving this, we shouldn't change this for this change, but I don't think we should mimic the JavaScriptCore c-API naming style here. Should instead be something like:

JSValueMakeBooleanOrNull(JSContextRef, Optional<bool>) -> makeValue(JSContextRef, Optional<bool>)
JSValueToNullableBoolean(JSContextRef, JSValueRef) -> toOptionalBool(JSContextRef, JSValueRef)
JSValueMakeStringOrNull(JSContextRef, JSStringRef) -> makeValueAllowingNull(JSContextRef, JSStringRef)
Comment 5 Darin Adler 2020-09-12 12:12:03 PDT
(In reply to Sam Weinig from comment #4)
> Since you are just moving this, we shouldn't change this for this change,
> but I don't think we should mimic the JavaScriptCore c-API naming style
> here. Should instead be something like:
> 
> JSValueMakeBooleanOrNull(JSContextRef, Optional<bool>) ->
> makeValue(JSContextRef, Optional<bool>)
> JSValueToNullableBoolean(JSContextRef, JSValueRef) ->
> toOptionalBool(JSContextRef, JSValueRef)
> JSValueMakeStringOrNull(JSContextRef, JSStringRef) ->
> makeValueAllowingNull(JSContextRef, JSStringRef)

Yes, I absolutely agree. You will see I chose names like that for the newer functions I created recently and even renamed one of the old ones, but not all of them yet.
Comment 6 Darin Adler 2020-09-12 12:12:42 PDT
Is there anyone with Windows and CMake build expertise that can help me figure out why the WinCairo build is failing? Something about the same precompiled header being used with different /D options?
Comment 7 Darin Adler 2020-09-12 15:09:17 PDT
(In reply to Sam Weinig from comment #4)
> JSValueMakeBooleanOrNull(JSContextRef, Optional<bool>) ->
> makeValue(JSContextRef, Optional<bool>)

Yes.

> JSValueToNullableBoolean(JSContextRef, JSValueRef) ->
> toOptionalBool(JSContextRef, JSValueRef)

Maybe optionalBoolean or optionalBooleanValue instead? Never sure whether to name after the C++ type keyword or after the full name of the type. Also not sure we need the "to" in a case like this.

> JSValueMakeStringOrNull(JSContextRef, JSStringRef) ->
> makeValueAllowingNull(JSContextRef, JSStringRef)

I think just makeValue. If we decide we need one that turns nullptr into an assertion, a crash, or an empty string we can give it the more unusual name.
Comment 8 Darin Adler 2020-09-12 15:10:55 PDT
Can’t land this until:

1) the fix for bug 216440 gets landed first, since I’ll have to merge with it

2) I figure out what to do on WinCairo. I do not understand why the build there is failing, since I put JSBasics.cpp in all the same places where JSWrapper.cpp was already mentioned. This could delay me indefinitely!
Comment 9 Fujii Hironori 2020-09-12 18:53:58 PDT
Created attachment 408630 [details]
Patch to disable the precompiled header for WinCairo DRT and WTR

Please disable the precompiled header for WinCairo DRT and WTR at the moment. I'll look into it next Monday.
Comment 10 Darin Adler 2020-09-12 22:06:36 PDT
Created attachment 408641 [details]
Patch
Comment 11 Darin Adler 2020-09-12 22:10:58 PDT
Created attachment 408642 [details]
Patch
Comment 12 Darin Adler 2020-09-12 23:21:45 PDT
Committed r266988: <https://trac.webkit.org/changeset/266988>
Comment 13 Radar WebKit Bug Importer 2020-09-12 23:22:15 PDT
<rdar://problem/68790483>