Bug 74933

Summary: [Qt][WK2] Add test for application URL schemes.
Product: WebKit Reporter: Zeno Albisser <zeno>
Component: WebKit2Assignee: Zeno Albisser <zeno>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarcelo, jesus, rafael.lobo, webkit.review.bot, zoltan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 74931    
Bug Blocks:    
Attachments:
Description Flags
patch for review.
kenneth: review+
patch for review. - update to fit the latest QML WebViewExperimental API.
none
patch for review. - add more test cases. kenneth: review+

Description Zeno Albisser 2011-12-20 07:54:17 PST
ssia
Comment 1 Zeno Albisser 2011-12-20 09:38:09 PST
Created attachment 120038 [details]
patch for review.
Comment 2 Kenneth Rohde Christiansen 2011-12-21 03:50:56 PST
Comment on attachment 120038 [details]
patch for review.

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

Test looks fine.

> Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml:13
> +        schemeDelegates: [
> +            UrlScheme {

Are there other types of scheme delegates than url schemes? just wondering
Comment 3 Zeno Albisser 2011-12-21 06:12:33 PST
Comment on attachment 120038 [details]
patch for review.

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

>> Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml:13
>> +            UrlScheme {
> 
> Are there other types of scheme delegates than url schemes? just wondering

Nope. I already mentioned that in https://bugs.webkit.org/show_bug.cgi?id=74931.
I think the API contains a bit too much redundancy schemeDelegates [ UrlScheme { scheme: ... } ]
Actually may be we should rename "schemeDelegates" to "urlSchemeDelegates". But that would even add more redundancy. :-S
It would be nice to get rid of the "UrlScheme" keyword and make it implicit. But i'm not sure that is possible in QML.
Comment 4 Zeno Albisser 2012-01-05 17:30:38 PST
Created attachment 121376 [details]
patch for review. - update to fit the latest QML WebViewExperimental API.
Comment 5 Zeno Albisser 2012-01-06 02:31:48 PST
Comment on attachment 121376 [details]
patch for review. - update to fit the latest QML WebViewExperimental API.

Clearing flags on attachment: 121376

Committed r104280: <http://trac.webkit.org/changeset/104280>
Comment 6 Zeno Albisser 2012-01-06 02:31:58 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Rafael Brandao 2012-01-06 03:31:45 PST
I think you should add a new test case to show how the requested url could be handled. In that test case, for example, you could check if you've got "something" requested.

Another test could be to have multiple schemes, and see if you've got the right delegate for each urlscheme as you would expect. :-)
Comment 8 Zeno Albisser 2012-01-06 03:41:55 PST
(In reply to comment #7)
> I think you should add a new test case to show how the requested url could be handled. In that test case, for example, you could check if you've got "something" requested.
> 
> Another test could be to have multiple schemes, and see if you've got the right delegate for each urlscheme as you would expect. :-)

Sure... i'll add some more stuff soon. :)
Comment 9 Zeno Albisser 2012-01-09 16:20:49 PST
Created attachment 121751 [details]
patch for review. - add more test cases.

as suggested by Rafael Brandao.
Comment 10 Kenneth Rohde Christiansen 2012-01-10 01:23:07 PST
Comment on attachment 121751 [details]
patch for review. - add more test cases.

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

> Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml:37
> +                    if ( request.url.toLowerCase() == "scheme3://url1")

why space before request?
Comment 11 Zeno Albisser 2012-01-24 04:29:02 PST
Committed r105728: <http://trac.webkit.org/changeset/105728>