Bug 216428

Summary: Send TestRendered event after running a test but before dumping
Product: WebKit Reporter: Darin Adler <darin>
Component: Tools / TestsAssignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, ap, ews-watchlist, gyuyoung.kim, Hironori.Fujii, ryuan.choi, sam, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
See Also: https://bugs.webkit.org/show_bug.cgi?id=186045
https://bugs.webkit.org/show_bug.cgi?id=216397
Bug Depends on: 216440    
Bug Blocks:    
Attachments:
Description Flags
Patch
sam: review+, ews-feeder: commit-queue-
Patch to disable the precompiled header for WinCairo DRT and WTR
none
Patch
ews-feeder: commit-queue-
Patch none

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>