Bug 84960

Summary: [GTK] Test WebKit2.RestoreSessionStateContainingFormData fails
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: gustavo, mcatanzaro, mrobinson, pnormand, sam, sergio, zan
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Patch
cgarcia: review-, cgarcia: commit-queue-
Patch zan: review+

Description Carlos Garcia Campos 2012-04-26 07:52:53 PDT
Session State is not implemented in GTK+ port
Comment 1 Carlos Garcia Campos 2015-09-18 00:02:58 PDT
The test crashes because it uses WKSessionStateCopyData() that requires an implementation of WebKit::encodeLegacySessionState(). The default implementation returns NULL.
Comment 2 Sam P. 2015-09-26 03:19:37 PDT
How do you actually run this test?  I have worked on an implementation of this ap and tested it with minibrowser, however, I can not find documentation on how to run these type of tests.
Comment 3 Michael Catanzaro 2015-09-26 07:13:37 PDT
Hi, thanks for working on this. Use the script Tools/Scripts/run-gtk-tests to run the tests. You will need to remove this test from the list of skipped tests up towards the top of that file.

That will run all the tests, though; I can't remember if I ever found a way to run a single cross-platform test or not.
Comment 4 Sam P. 2015-09-26 20:20:16 PDT
Created attachment 261985 [details]
Patch
Comment 5 Michael Catanzaro 2015-10-08 18:25:04 PDT
View in context: https://bugs.webkit.org/attachment.cgi?id=261985&action=review

> Source/WebKit2/ChangeLog:8
> +        This commit adds an implimentation of the LegacySessionStateCoding.  It is based off of

implementation

> Source/WebKit2/ChangeLog:9
> +        the mac implimentation, however instead of using core foundation dictionaries it uses

Ditto

> Source/WebKit2/PlatformGTK.cmake:367
> +    UIProcess/LegacySessionStateCodingNone.cpp

Instead of doing this, let's remove it from CMakeLists.txt and add it manually to all the other Platform*.cmake files.
Comment 6 Carlos Garcia Campos 2015-10-08 23:30:56 PDT
*** Bug 88455 has been marked as a duplicate of this bug. ***
Comment 7 Carlos Garcia Campos 2015-10-08 23:36:42 PDT
Comment on attachment 261985 [details]
Patch

I'm sorry if I didn't explain it correctly, I didn't mean we needed a new implementation of the legacy decoders. Those are there only for compatibility with Safari, but still used by the unit tests. We already have a cross-platform implementation of the SessionState, so we don't need to copy the mac legacy encoders/decoders, but simply use the new implementation.
Comment 8 Carlos Garcia Campos 2015-10-08 23:41:59 PDT
Created attachment 262753 [details]
Patch

This is what I meant
Comment 9 Sam P. 2015-10-08 23:46:23 PDT
That looks great!
Comment 10 Zan Dobersek 2015-10-15 01:01:02 PDT
Comment on attachment 262753 [details]
Patch

r=me
Comment 11 Carlos Garcia Campos 2015-10-15 01:19:42 PDT
Committed r191103: <http://trac.webkit.org/changeset/191103>