The test uses a setTimeout of 500 for each test case, which is usually enough, but not always. You can see the flakiness in the Chromium port's flakiness dashboard: http://src.chromium.org/viewvc/chrome/trunk/src/webkit/tools/layout_tests/flakiness_dashboard.html#tests=LayoutTests%2Ffast%2Fencoding%2Fchar-encoding.html
Created attachment 43335 [details]
Removes the setTimeout causing the test to be flaky. bdash indicated on irc that it was ok to do so.
Committed as http://trac.webkit.org/changeset/51088