[webkit-dev] Enable encoding detector on layout(regression) test

Eric Seidel eric at webkit.org
Wed Sep 19 09:28:13 PDT 2012


Yes, Darin's second suggestion should work.  You'll need an outer HTML
like this:

<html>
<body>
<iframe id="test" src="resources/bad-encoding.html onload="runTest()>
<script>
function runTest() {
  // Detect whatever you need to here on test.contentDocument
}
</script>
</body>
</html>

You can even send it over http if you want, via http/tests

run-webkit-httpd if you want to test manually in your browser, or
run-webkit-tests http/tests/encoding/your-test-name.html

On Wed, Sep 19, 2012 at 11:23 AM, Darin Adler <darin at apple.com> wrote:
> On Sep 19, 2012, at 9:22 AM, Darin Adler <darin at apple.com> wrote:
>
>> On Sep 18, 2012, at 6:25 PM, Kangil Han <kangil.han at samsung.com> wrote:
>>
>>> However, enabling encoding detector by javaScript manipulation seems not feasible since encoding detector works on reading input stream level.
>>
>> You could probably make an encoding detection test using an iframe with a data URL in it. Have you tried that?
>
> Or perhaps an iframe loading a resource that’s just a separate file in the testing directory.
>
> -- Darin
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo/webkit-dev


More information about the webkit-dev mailing list