Bug 188810 - Translate WebKit.LimitTitleSize API test into ObjC
Summary: Translate WebKit.LimitTitleSize API test into ObjC
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-08-21 13:32 PDT by Alex Christensen
Modified: 2018-08-22 13:47 PDT (History)
5 users (show)

See Also:


Attachments
Patch (9.75 KB, patch)
2018-08-21 13:34 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
patch with updated title (9.76 KB, patch)
2018-08-21 13:44 PDT, Alex Christensen
aestes: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2018-08-21 13:32:18 PDT
Translate WebKit.LimitTitleSize into ObjC
Comment 1 Alex Christensen 2018-08-21 13:34:12 PDT
Created attachment 347682 [details]
Patch
Comment 2 Alex Christensen 2018-08-21 13:44:11 PDT
Created attachment 347685 [details]
patch with updated title
Comment 3 Andy Estes 2018-08-21 14:07:00 PDT
Comment on attachment 347685 [details]
patch with updated title

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

> Tools/TestWebKitAPI/Tests/mac/LimitTitleSize.mm:76
> +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context

void*

> Tools/TestWebKitAPI/Tests/mac/LimitTitleSize.mm:81
> +    waitUntilLongTitleReceived = true;

Seems like this is named opposite of what it means, but ok :)
Comment 4 Alex Christensen 2018-08-21 14:17:49 PDT
Fixed 32-bit build and landed in http://trac.webkit.org/r235140
Comment 5 Radar WebKit Bug Importer 2018-08-21 14:18:19 PDT
<rdar://problem/43576938>
Comment 6 Dawei Fenton (:realdawei) 2018-08-21 15:52:20 PDT
(In reply to Alex Christensen from comment #4)
> Fixed 32-bit build and landed in http://trac.webkit.org/r235140

Seeing two API test failures after this revision:

https://build.webkit.org/builders/Apple%20Sierra%20Release%20WK2%20%28Tests%29/builds/11218/steps/run-api-tests/logs/stdio
Failed

    TestWebKitAPI.WKWebView.LoadAlternateHTMLStringFromProvisionalLoadError
        
        /Volumes/Data/slave/sierra-release/build/Tools/TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm:90
        Value of: [webView canGoForward]
          Actual: false
        Expected: true
        

Crashed

    TestWebKitAPI.WebKit.LimitTitleSize
        2018-08-21 15:34:28.235 TestWebKitAPI[18805:17659792] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'An instance 0x7fae0e6185c0 of class WKWebView was deallocated while key value observers were still registered with it. Current observation info: <NSKeyValueObservationInfo 0x7fae0e63ce00> (
        <NSKeyValueObservance 0x7fae0e626350: Observer: 0x7fae0e63b920, Key path: title, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: 0x7fae0e63aef0>
        )'
        *** First throw call stack:
        (
        	0   CoreFoundation                      0x00007fff9b20357b __exceptionPreprocess + 171
        	1   libobjc.A.dylib                     0x00007fffb04631da objc_exception_throw + 48
        	2   CoreFoundation                      0x00007fff9b280c55 +[NSException raise:format:] + 197
        	3   Foundation                          0x00007fff9cc00384 NSKVODeallocate + 293
        	4   libobjc.A.dylib                     0x00007fffb0458350 _ZN12_GLOBAL__N_119AutoreleasePoolPage3popEPv + 808
        	5   CoreFoundation                      0x00007fff9b13ab86 _CFAutoreleasePoolPop + 22
        	6   Foundation                          0x00007fff9cb9fb57 -[NSAutoreleasePool drain] + 146
        	7   TestWebKitAPI                       0x0000000102c5d291 main + 360
        	8   libdyld.dylib                       0x00007fffb0d44235 start + 1
        	9   ???                                 0x0000000000000002 0x0 + 2
        )
        libc++abi.dylib: terminating with uncaught exception of type NSException
Comment 7 Alex Christensen 2018-08-21 16:44:07 PDT
That was probably caused by http://trac.webkit.org/r235139
Comment 8 Dawei Fenton (:realdawei) 2018-08-21 16:45:43 PDT
(In reply to Alex Christensen from comment #7)
> That was probably caused by http://trac.webkit.org/r235139

I see, can you fix this one?
Comment 9 Ryan Haddad 2018-08-21 20:06:15 PDT
The failure seen with TestWebKitAPI.WKWebView.LoadAlternateHTMLStringFromProvisionalLoadError was caused by http://trac.webkit.org/r235139 and resolved by https://trac.webkit.org/changeset/235146/webkit

The crash seen with TestWebKitAPI.WebKit.LimitTitleSize is still an issue, as seen her with r235152:
https://build.webkit.org/builders/Apple%20Sierra%20Release%20WK2%20(Tests)/builds/11226
Comment 10 Ryan Haddad 2018-08-21 21:04:54 PDT
(In reply to Ryan Haddad from comment #9)
> The crash seen with TestWebKitAPI.WebKit.LimitTitleSize is still an issue,
> as seen her with r235152:
> https://build.webkit.org/builders/Apple%20Sierra%20Release%20WK2%20(Tests)/
> builds/11226
This appears to be limited to Sierra.
Comment 11 Alex Christensen 2018-08-22 13:47:09 PDT
I'm guessing http://trac.webkit.org/r235199 will fix the exception on Sierra.