WebCore settings may have been modified through window.internals and DRT should be able to reset them back to their original values before each test run. The above support provides a framework so that Internals can restore the original values automatically.
Created attachment 104054 [details]
The patch works for mac and qt.
Attachment 104054 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebCore/testing/js/WebCoreTestSupport.cpp:59: One line control clauses should not use braces. [whitespace/braces] 
Total errors found: 1 in 11 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 104054 [details]
This is a great start. We shouldn't land this with partial port support though. Cross-port support is the whole point of window.internals.
Created attachment 104078 [details]
fix patch 2
Comment on attachment 104078 [details]
fix patch 2
View in context: https://bugs.webkit.org/attachment.cgi?id=104078&action=review
> + Internals * internals = toInternals(globalObject->getDirect(exec->globalData(), Identifier(exec, "internals")));
Now that we're using it in more than one place, the literal should probably be a constant in this file.
> + v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(context->Global()->Get(v8::String::New("internals")));
Created attachment 104200 [details]
patch 3: reviewed with minor fix
Manually committed r93235: <http://trac.webkit.org/changeset/93235>