Bug 85131 - [GTK] DRT needs an implementation of layoutTestController.setDomainRelaxationForbiddenForURLScheme
Summary: [GTK] DRT needs an implementation of layoutTestController.setDomainRelaxation...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sudarsana Nagineni (babu)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-28 02:27 PDT by Sudarsana Nagineni (babu)
Modified: 2012-04-29 08:24 PDT (History)
2 users (show)

See Also:


Attachments
Patch (5.44 KB, patch)
2012-04-28 03:14 PDT, Sudarsana Nagineni (babu)
mrobinson: review-
Details | Formatted Diff | Diff
Patch (5.31 KB, patch)
2012-04-29 04:38 PDT, Sudarsana Nagineni (babu)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sudarsana Nagineni (babu) 2012-04-28 02:27:15 PDT
Implement layoutTestController.setDomainRelaxationForbiddenForURLScheme in order to unskip the following test.
http/tests/security/setDomainRelaxationForbiddenForURLScheme.html
Comment 1 Sudarsana Nagineni (babu) 2012-04-28 03:14:02 PDT
Created attachment 139348 [details]
Patch

Implement setDomainRelaxationForbiddenForURLScheme
Comment 2 Martin Robinson 2012-04-28 09:10:57 PDT
Comment on attachment 139348 [details]
Patch

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

Looks good, but there's one change I suggest...

> Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp:916
> +    size_t bufferSize = JSStringGetMaximumUTF8CStringSize(scheme);
> +    GOwnPtr<gchar> schemeBuffer(static_cast<gchar*>(g_malloc(bufferSize)));
> +    JSStringGetUTF8CString(scheme, schemeBuffer.get(), bufferSize);
> +
> +    SchemeRegistry::setDomainRelaxationForbiddenForURLScheme(forbidden, String::fromUTF8(schemeBuffer.get()));

Most of the DumpRenderTreeSupportGtk method use char* instead of JSString. You should do the conversion in LayoutTestController.
Comment 3 Sudarsana Nagineni (babu) 2012-04-29 04:35:26 PDT
(In reply to comment #2)
> Looks good, but there's one change I suggest...
> 
> > Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp:916
> > +    size_t bufferSize = JSStringGetMaximumUTF8CStringSize(scheme);
> > +    GOwnPtr<gchar> schemeBuffer(static_cast<gchar*>(g_malloc(bufferSize)));
> > +    JSStringGetUTF8CString(scheme, schemeBuffer.get(), bufferSize);
> > +
> > +    SchemeRegistry::setDomainRelaxationForbiddenForURLScheme(forbidden, String::fromUTF8(schemeBuffer.get()));
> 
> Most of the DumpRenderTreeSupportGtk method use char* instead of JSString. You should do the conversion in LayoutTestController.

Thanks for the review Martin. I will make this change.
Comment 4 Sudarsana Nagineni (babu) 2012-04-29 04:38:28 PDT
Created attachment 139399 [details]
Patch

Fixed review comment #2.
Comment 5 WebKit Review Bot 2012-04-29 08:24:29 PDT
Comment on attachment 139399 [details]
Patch

Clearing flags on attachment: 139399

Committed r115597: <http://trac.webkit.org/changeset/115597>
Comment 6 WebKit Review Bot 2012-04-29 08:24:33 PDT
All reviewed patches have been landed.  Closing bug.