<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[47017] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/47017">47017</a></dd>
<dt>Author</dt> <dd>dimich@chromium.org</dd>
<dt>Date</dt> <dd>2009-08-10 19:55:03 -0700 (Mon, 10 Aug 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>Revert r47015 &quot;Added support for overriding default preferences per-test.&quot;
https://bugs.webkit.org/show_bug.cgi?id=20534

Ir broke too many Windows tests and I don't have a simple fix right now.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformgtkSkipped">trunk/LayoutTests/platform/gtk/Skipped</a></li>
<li><a href="#trunkLayoutTestsplatformqtSkipped">trunk/LayoutTests/platform/qt/Skipped</a></li>
<li><a href="#trunkWebKitmacChangeLog">trunk/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkWebKitmacWebViewWebPreferencesmm">trunk/WebKit/mac/WebView/WebPreferences.mm</a></li>
<li><a href="#trunkWebKitmacWebViewWebPreferencesPrivateh">trunk/WebKit/mac/WebView/WebPreferencesPrivate.h</a></li>
<li><a href="#trunkWebKitwinChangeLog">trunk/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkWebKitwinInterfacesIWebPreferencesPrivateidl">trunk/WebKit/win/Interfaces/IWebPreferencesPrivate.idl</a></li>
<li><a href="#trunkWebKitwinWebPreferencescpp">trunk/WebKit/win/WebPreferences.cpp</a></li>
<li><a href="#trunkWebKitwinWebPreferencesh">trunk/WebKit/win/WebPreferences.h</a></li>
<li><a href="#trunkWebKitToolsChangeLog">trunk/WebKitTools/ChangeLog</a></li>
<li><a href="#trunkWebKitToolsDumpRenderTreeLayoutTestControllercpp">trunk/WebKitTools/DumpRenderTree/LayoutTestController.cpp</a></li>
<li><a href="#trunkWebKitToolsDumpRenderTreeLayoutTestControllerh">trunk/WebKitTools/DumpRenderTree/LayoutTestController.h</a></li>
<li><a href="#trunkWebKitToolsDumpRenderTreegtkLayoutTestControllerGtkcpp">trunk/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp</a></li>
<li><a href="#trunkWebKitToolsDumpRenderTreemacDumpRenderTreemm">trunk/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm</a></li>
<li><a href="#trunkWebKitToolsDumpRenderTreemacLayoutTestControllerMacmm">trunk/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm</a></li>
<li><a href="#trunkWebKitToolsDumpRenderTreewinDumpRenderTreecpp">trunk/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp</a></li>
<li><a href="#trunkWebKitToolsDumpRenderTreewinLayoutTestControllerWincpp">trunk/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp</a></li>
<li><a href="#trunkWebKitToolsDumpRenderTreewxLayoutTestControllerWxcpp">trunk/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastharnessoverridepreferences2expectedtxt">trunk/LayoutTests/fast/harness/override-preferences-2-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastharnessoverridepreferences2html">trunk/LayoutTests/fast/harness/override-preferences-2.html</a></li>
<li><a href="#trunkLayoutTestsfastharnessoverridepreferencesexpectedtxt">trunk/LayoutTests/fast/harness/override-preferences-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastharnessoverridepreferenceshtml">trunk/LayoutTests/fast/harness/override-preferences.html</a></li>
<li><a href="#trunkLayoutTestsfastharnessoverridezzzresetexpectedtxt">trunk/LayoutTests/fast/harness/override-zzz-reset-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastharnessoverridezzzresethtml">trunk/LayoutTests/fast/harness/override-zzz-reset.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (47016 => 47017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2009-08-11 02:53:53 UTC (rev 47016)
+++ trunk/LayoutTests/ChangeLog        2009-08-11 02:55:03 UTC (rev 47017)
</span><span class="lines">@@ -1,22 +1,3 @@
</span><del>-2009-08-10  Dmitry Titov  &lt;dimich@chromium.org&gt;
-
-        Reviewed by Adam Roben.
-
-        Originally implemented by Glenn Wilson  &lt;gwilson@chromium.org&gt;.
-
-        Added tests to verify that default preferences can be overridden per-test
-        and that overridden values are reset between each test.
-        See https://bugs.webkit.org/show_bug.cgi?id=20534
-
-        * fast/harness/override-preferences-2-expected.txt: Added.
-        * fast/harness/override-preferences-2.html: Added. Verifies overridePreverence(&quot;WebKitDefaultFontSize&quot;, &quot;24&quot;).
-        * fast/harness/override-preferences-expected.txt: Added.
-        * fast/harness/override-preferences.html: Added. Verifies overridePreference(&quot;WebKitJavaScriptEnabled&quot;, false).
-        * fast/harness/override-zzz-reset-expected.txt: Added.
-        * fast/harness/override-zzz-reset.html: Added. Because of 'zzz' this test will run after the tests above and
-        verify that override of preferences does not 'spill' to the subsequent tests in a batch.
-        * platform/gtk/Skipped: Tests above disabled for GTK until GTK DRT implements preference override.
-
</del><span class="cx"> 2009-08-07  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Justin Garcia.
</span></span></pre></div>
<a id="trunkLayoutTestsfastharnessoverridepreferences2expectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/harness/override-preferences-2-expected.txt (47016 => 47017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/harness/override-preferences-2-expected.txt        2009-08-11 02:53:53 UTC (rev 47016)
+++ trunk/LayoutTests/fast/harness/override-preferences-2-expected.txt        2009-08-11 02:55:03 UTC (rev 47017)
</span><span class="lines">@@ -1,3 +0,0 @@
</span><del>-This test verifies that layoutTestController can have its default preferences overriden. This test verifies that the API will accept string values and also override the default font size. You should see &quot;PASS&quot; below.
-
-PASS
</del></span></pre></div>
<a id="trunkLayoutTestsfastharnessoverridepreferences2html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/harness/override-preferences-2.html (47016 => 47017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/harness/override-preferences-2.html        2009-08-11 02:53:53 UTC (rev 47016)
+++ trunk/LayoutTests/fast/harness/override-preferences-2.html        2009-08-11 02:55:03 UTC (rev 47017)
</span><span class="lines">@@ -1,18 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;script&gt;
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        layoutTestController.overridePreference(&quot;WebKitDefaultFontSize&quot;, &quot;24&quot;);
-    }
-&lt;/script&gt;
-&lt;body&gt;
-    &lt;p&gt;This test verifies that layoutTestController can have its default preferences overriden.
-    This test verifies that the API will accept string values and also override the default font size.
-    You should see &quot;PASS&quot; below.&lt;/p&gt;
-    &lt;script&gt;
-        var p = document.getElementsByTagName(&quot;p&quot;)[0];
-        if (!window.layoutTestController || window.getComputedStyle(p).fontSize == &quot;24px&quot;)
-            document.write(&quot;PASS&quot;);
-    &lt;/script&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastharnessoverridepreferencesexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/harness/override-preferences-expected.txt (47016 => 47017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/harness/override-preferences-expected.txt        2009-08-11 02:53:53 UTC (rev 47016)
+++ trunk/LayoutTests/fast/harness/override-preferences-expected.txt        2009-08-11 02:55:03 UTC (rev 47017)
</span><span class="lines">@@ -1,3 +0,0 @@
</span><del>-This is a test that verifies that layoutTestController can have its default preferences overridden. This test specifically checks that Javascript can be disabled, and you should see &quot;PASS&quot; below if viewing with a browser.
-
-PASS
</del></span></pre></div>
<a id="trunkLayoutTestsfastharnessoverridepreferenceshtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/harness/override-preferences.html (47016 => 47017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/harness/override-preferences.html        2009-08-11 02:53:53 UTC (rev 47016)
+++ trunk/LayoutTests/fast/harness/override-preferences.html        2009-08-11 02:55:03 UTC (rev 47017)
</span><span class="lines">@@ -1,18 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;body&gt;
-&lt;script&gt;
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText()
-        layoutTestController.overridePreference(&quot;WebKitJavaScriptEnabled&quot;, false);
-    }
-
-    function loadstatus() {
-        if (window.layoutTestController)
-            document.getElementById(&quot;status&quot;).innerHTML = &quot;FAIL&quot;;
-    }
-&lt;/script&gt;
-&lt;body onload=&quot;loadstatus()&quot;&gt;
-    &lt;p&gt;This is a test that verifies that layoutTestController can have its default preferences overridden.  This test specifically checks that Javascript can be disabled, and you should see &quot;PASS&quot; below if viewing with a browser.&lt;/p&gt;
-    &lt;span id=&quot;status&quot;&gt;PASS&lt;/span&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastharnessoverridezzzresetexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/harness/override-zzz-reset-expected.txt (47016 => 47017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/harness/override-zzz-reset-expected.txt        2009-08-11 02:53:53 UTC (rev 47016)
+++ trunk/LayoutTests/fast/harness/override-zzz-reset-expected.txt        2009-08-11 02:55:03 UTC (rev 47017)
</span><span class="lines">@@ -1,3 +0,0 @@
</span><del>-This test verifies that the layoutTestController will reset its default preferences after every layout test. You should see &quot;PASS&quot; below.
-
-PASS
</del></span></pre></div>
<a id="trunkLayoutTestsfastharnessoverridezzzresethtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/harness/override-zzz-reset.html (47016 => 47017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/harness/override-zzz-reset.html        2009-08-11 02:53:53 UTC (rev 47016)
+++ trunk/LayoutTests/fast/harness/override-zzz-reset.html        2009-08-11 02:55:03 UTC (rev 47017)
</span><span class="lines">@@ -1,14 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;body&gt;
-&lt;script&gt;
-    if (window.layoutTestController)
-        layoutTestController.dumpAsText();
-&lt;/script&gt;
-&lt;body&gt;
-    &lt;p&gt;This test verifies that the layoutTestController will reset its default preferences after every layout test.  You should see &quot;PASS&quot; below.&lt;/p&gt;
-    &lt;span id=&quot;status&quot;&gt;FAIL&lt;/span&gt;
-    &lt;script&gt;
-        document.getElementById(&quot;status&quot;).innerHTML = &quot;PASS&quot;;
-    &lt;/script&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsplatformgtkSkipped"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/Skipped (47016 => 47017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/Skipped        2009-08-11 02:53:53 UTC (rev 47016)
+++ trunk/LayoutTests/platform/gtk/Skipped        2009-08-11 02:55:03 UTC (rev 47017)
</span><span class="lines">@@ -5974,8 +5974,3 @@
</span><span class="cx"> 
</span><span class="cx"> # https://bugs.webkit.org/show_bug.cgi?id=28088 -- document.activeElement does not work
</span><span class="cx"> editing/selection/find-in-text-control.html
</span><del>-
-# Missing DRT ability to override 'standard' preferences.
-fast/harness/override-preferences.html
-fast/harness/override-preferences-2.html
-fast/harness/override-zzz-reset.html
</del></span></pre></div>
<a id="trunkLayoutTestsplatformqtSkipped"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/qt/Skipped (47016 => 47017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/qt/Skipped        2009-08-11 02:53:53 UTC (rev 47016)
+++ trunk/LayoutTests/platform/qt/Skipped        2009-08-11 02:55:03 UTC (rev 47017)
</span><span class="lines">@@ -5117,8 +5117,3 @@
</span><span class="cx"> fast/borders/border-radius-split-inline.html
</span><span class="cx"> fast/forms/select-popup-pagekeys.html
</span><span class="cx"> fast/dom/prototype-inheritance-2.html
</span><del>-
-# Missing DRT ability to override 'standard' preferences.
-fast/harness/override-preferences.html
-fast/harness/override-preferences-2.html
-fast/harness/override-zzz-reset.html
</del></span></pre></div>
<a id="trunkWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/ChangeLog (47016 => 47017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/ChangeLog        2009-08-11 02:53:53 UTC (rev 47016)
+++ trunk/WebKit/mac/ChangeLog        2009-08-11 02:55:03 UTC (rev 47017)
</span><span class="lines">@@ -1,17 +1,3 @@
</span><del>-2009-08-10  Dmitry Titov  &lt;dimich@chromium.org&gt;
-
-        Reviewed by Adam Roben.
-
-        Originally implemented by Glenn Wilson &lt;gwilson@chromium.org&gt;.
-
-        Added new methods for overriding default WebPreference values
-        and for resetting preferences to their defaults.
-        See https://bugs.webkit.org/show_bug.cgi?id=20534
-
-        * WebView/WebPreferences.mm:
-        (-[WebPreferences _setPreferenceForTestWithValue:withKey:]): added.
-        * WebView/WebPreferencesPrivate.h: same.
-
</del><span class="cx"> 2009-08-09  Nikolas Zimmermann  &lt;nikolas.zimmermann@torchmobile.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by George Staikos.
</span></span></pre></div>
<a id="trunkWebKitmacWebViewWebPreferencesmm"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/WebView/WebPreferences.mm (47016 => 47017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/WebView/WebPreferences.mm        2009-08-11 02:53:53 UTC (rev 47016)
+++ trunk/WebKit/mac/WebView/WebPreferences.mm        2009-08-11 02:55:03 UTC (rev 47017)
</span><span class="lines">@@ -1152,12 +1152,6 @@
</span><span class="cx"> {
</span><span class="cx">     ++_private-&gt;numWebViews;
</span><span class="cx"> }
</span><del>-
-- (void)_setPreferenceForTestWithValue:(NSString *)value forKey:(NSString *)key
-{
-    [self _setStringValue:value forKey:key];
-}
-
</del><span class="cx"> @end
</span><span class="cx"> 
</span><span class="cx"> @implementation WebPreferences (WebInternal)
</span></span></pre></div>
<a id="trunkWebKitmacWebViewWebPreferencesPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/WebView/WebPreferencesPrivate.h (47016 => 47017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/WebView/WebPreferencesPrivate.h        2009-08-11 02:53:53 UTC (rev 47016)
+++ trunk/WebKit/mac/WebView/WebPreferencesPrivate.h        2009-08-11 02:55:03 UTC (rev 47017)
</span><span class="lines">@@ -117,10 +117,6 @@
</span><span class="cx"> - (WebTextDirectionSubmenuInclusionBehavior)textDirectionSubmenuInclusionBehavior;
</span><span class="cx"> - (void)setTextDirectionSubmenuInclusionBehavior:(WebTextDirectionSubmenuInclusionBehavior)behavior;
</span><span class="cx"> 
</span><del>-// Used to set preference specified in the test via LayoutTestController.overridePreference(..).
-// For use with DumpRenderTree only.
-- (void)_setPreferenceForTestWithValue:(NSString *)value forKey:(NSString *)key;
-
</del><span class="cx"> // If site-specific spoofing is enabled, some pages that do inappropriate user-agent string checks will be
</span><span class="cx"> // passed a nonstandard user-agent string to get them to work correctly. This method might be removed in
</span><span class="cx"> // the future when there's no more need for it.
</span></span></pre></div>
<a id="trunkWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/win/ChangeLog (47016 => 47017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/win/ChangeLog        2009-08-11 02:53:53 UTC (rev 47016)
+++ trunk/WebKit/win/ChangeLog        2009-08-11 02:55:03 UTC (rev 47017)
</span><span class="lines">@@ -1,16 +1,3 @@
</span><del>-2009-08-10  Dmitry Titov &lt;dimich@chromium.org&gt;
-
-        Reviewed by Adam Roben.
-
-        Originally implemented by Glenn Wilson  &lt;gwilson@chromium.org&gt;.
-
-        Added support for overriding default preferences per-test.
-        See https://bugs.webkit.org/show_bug.cgi?id=20534
-
-        * Interfaces/IWebPreferencesPrivate.idl: added new method setPreferenceForTest
-        * WebPreferences.cpp: same.
-        * WebPreferences.h: same.
-
</del><span class="cx"> 2009-08-10  Dan Bernstein  &lt;mitz@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Darin Adler.
</span></span></pre></div>
<a id="trunkWebKitwinInterfacesIWebPreferencesPrivateidl"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/win/Interfaces/IWebPreferencesPrivate.idl (47016 => 47017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/win/Interfaces/IWebPreferencesPrivate.idl        2009-08-11 02:53:53 UTC (rev 47016)
+++ trunk/WebKit/win/Interfaces/IWebPreferencesPrivate.idl        2009-08-11 02:55:03 UTC (rev 47017)
</span><span class="lines">@@ -78,8 +78,4 @@
</span><span class="cx"> 
</span><span class="cx">     HRESULT isXSSAuditorEnabled([out, retval] BOOL *enabled);
</span><span class="cx">     HRESULT setXSSAuditorEnabled([in] BOOL enabled);
</span><del>-
-    // Used to set preference specified by a test via LayoutTestController.overridePreference(..).
-    // Used by DumpRenderTree.
-    HRESULT setPreferenceForTest([in] BSTR key, [in] BSTR value);
</del><span class="cx"> }
</span></span></pre></div>
<a id="trunkWebKitwinWebPreferencescpp"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/win/WebPreferences.cpp (47016 => 47017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/win/WebPreferences.cpp        2009-08-11 02:53:53 UTC (rev 47016)
+++ trunk/WebKit/win/WebPreferences.cpp        2009-08-11 02:55:03 UTC (rev 47017)
</span><span class="lines">@@ -1301,17 +1301,6 @@
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-HRESULT WebPreferences::setPreferenceForTest(BSTR key, BSTR value)
-{
-    if (!SysStringLen(key) || !SysStringLen(value))
-        return E_FAIL;
-    RetainPtr&lt;CFStringRef&gt; keyString(AdoptCF, CFStringCreateWithCharacters(0, reinterpret_cast&lt;UniChar*&gt;(key), SysStringLen(key)));
-    RetainPtr&lt;CFStringRef&gt; valueString(AdoptCF, CFStringCreateWithCharacters(0, reinterpret_cast&lt;UniChar*&gt;(value), SysStringLen(value)));
-    setValueForKey(keyString.get(), valueString.get());
-    postPreferencesChangesNotification();
-    return S_OK;
-}
-
</del><span class="cx"> void WebPreferences::willAddToWebView()
</span><span class="cx"> {
</span><span class="cx">     ++m_numWebViews;
</span></span></pre></div>
<a id="trunkWebKitwinWebPreferencesh"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/win/WebPreferences.h (47016 => 47017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/win/WebPreferences.h        2009-08-11 02:53:53 UTC (rev 47016)
+++ trunk/WebKit/win/WebPreferences.h        2009-08-11 02:55:03 UTC (rev 47017)
</span><span class="lines">@@ -340,7 +340,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual HRESULT STDMETHODCALLTYPE fontSmoothingContrast( 
</span><span class="cx">     /* [retval][out] */ float* contrast);
</span><del>-
</del><ins>+    
</ins><span class="cx">     virtual HRESULT STDMETHODCALLTYPE setFontSmoothingContrast( 
</span><span class="cx">     /* [in] */ float contrast);
</span><span class="cx"> 
</span><span class="lines">@@ -362,11 +362,6 @@
</span><span class="cx">     virtual HRESULT STDMETHODCALLTYPE setXSSAuditorEnabled(
</span><span class="cx">     /* [in] */ BOOL enabled);
</span><span class="cx"> 
</span><del>-    virtual HRESULT STDMETHODCALLTYPE setPreferenceForTest(
-    /* [in] */ BSTR key,
-    /* [in] */ BSTR value);
-
-
</del><span class="cx">     // WebPreferences
</span><span class="cx"> 
</span><span class="cx">     // This method accesses a different preference key than developerExtrasEnabled.
</span></span></pre></div>
<a id="trunkWebKitToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKitTools/ChangeLog (47016 => 47017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitTools/ChangeLog        2009-08-11 02:53:53 UTC (rev 47016)
+++ trunk/WebKitTools/ChangeLog        2009-08-11 02:55:03 UTC (rev 47017)
</span><span class="lines">@@ -1,34 +1,3 @@
</span><del>-2009-08-10  Dmitry Titov  &lt;dimich@chromium.org&gt;
-
-        Reviewed by Adam Roben.
-
-        Originally implemented by Glenn Wilson  &lt;gwilson@chromium.org&gt;.
-
-        Added support for overriding default preferences per-test.
-        See https://bugs.webkit.org/show_bug.cgi?id=20534
-
-        * DumpRenderTree/LayoutTestController.cpp:
-        (overridePreferenceCallback): add wiring for layoutTestController.overridePreference.
-        (LayoutTestController::staticFunctions): same.
-        * DumpRenderTree/LayoutTestController.h: same.
-        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
-        (LayoutTestController::overridePreference): added empty overridePreference method.
-        * DumpRenderTree/mac/DumpRenderTree.mm: implemented preference override.
-        (resetDefaultsToConsistentValues): new method, resets preferences to same set of value before every test.
-        (setDefaultsToConsistentValuesForTesting): new method, sets other details of testing environment, every time  DRT starts.
-        (resetWebViewToConsistentStateBeforeTesting): move some preference setting from here to new resetDefaultsToConsistentValues().
-        * DumpRenderTree/mac/LayoutTestControllerMac.mm:
-        (LayoutTestController::overridePreference):
-        * DumpRenderTree/win/DumpRenderTree.cpp:
-        (resetDefaultsToConsistentValues): new method, resets preferences to same set of value before every test.
-        (resetWebViewToConsistentStateBeforeTesting): move some preference setting from here to new resetDefaultsToConsistentValues().
-        (createWebViewAndOffscreenWindow): same.
-        (main): same.
-        * DumpRenderTree/win/LayoutTestControllerWin.cpp:
-        (LayoutTestController::overridePreference):
-        * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
-        (LayoutTestController::overridePreference):
-
</del><span class="cx"> 2009-08-10  Steve Falkenburg  &lt;sfalken@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Windows nightly fix.
</span></span></pre></div>
<a id="trunkWebKitToolsDumpRenderTreeLayoutTestControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/WebKitTools/DumpRenderTree/LayoutTestController.cpp (47016 => 47017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitTools/DumpRenderTree/LayoutTestController.cpp        2009-08-11 02:53:53 UTC (rev 47016)
+++ trunk/WebKitTools/DumpRenderTree/LayoutTestController.cpp        2009-08-11 02:55:03 UTC (rev 47017)
</span><span class="lines">@@ -377,22 +377,6 @@
</span><span class="cx">     return JSValueMakeBoolean(context, controller-&gt;isCommandEnabled(name.get()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static JSValueRef overridePreferenceCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
-    if (argumentCount &lt; 2)
-        return JSValueMakeUndefined(context);
-
-    JSRetainPtr&lt;JSStringRef&gt; key(Adopt, JSValueToStringCopy(context, arguments[0], exception));
-    ASSERT(!*exception);
-    JSRetainPtr&lt;JSStringRef&gt; value(Adopt, JSValueToStringCopy(context, arguments[1], exception));
-    ASSERT(!*exception);
-
-    LayoutTestController* controller = static_cast&lt;LayoutTestController*&gt;(JSObjectGetPrivate(thisObject));
-    controller-&gt;overridePreference(key.get(), value.get());
-
-    return JSValueMakeUndefined(context);
-}
-
</del><span class="cx"> static JSValueRef keepWebHistoryCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
</span><span class="cx"> {
</span><span class="cx">     // Has mac implementation
</span><span class="lines">@@ -957,7 +941,6 @@
</span><span class="cx">         { &quot;keepWebHistory&quot;, keepWebHistoryCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx">         { &quot;notifyDone&quot;, notifyDoneCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx">         { &quot;numberOfActiveAnimations&quot;, numberOfActiveAnimationsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><del>-        { &quot;overridePreference&quot;, overridePreferenceCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</del><span class="cx">         { &quot;pathToLocalResource&quot;, pathToLocalResourceCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx">         { &quot;pauseAnimationAtTimeOnElementWithId&quot;, pauseAnimationAtTimeOnElementWithIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx">         { &quot;pauseTransitionAtTimeOnElementWithId&quot;, pauseTransitionAtTimeOnElementWithIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span></span></pre></div>
<a id="trunkWebKitToolsDumpRenderTreeLayoutTestControllerh"></a>
<div class="modfile"><h4>Modified: trunk/WebKitTools/DumpRenderTree/LayoutTestController.h (47016 => 47017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitTools/DumpRenderTree/LayoutTestController.h        2009-08-11 02:53:53 UTC (rev 47016)
+++ trunk/WebKitTools/DumpRenderTree/LayoutTestController.h        2009-08-11 02:55:03 UTC (rev 47017)
</span><span class="lines">@@ -53,7 +53,6 @@
</span><span class="cx">     bool isCommandEnabled(JSStringRef name);
</span><span class="cx">     void keepWebHistory();
</span><span class="cx">     void notifyDone();
</span><del>-    void overridePreference(JSStringRef key, JSStringRef value);
</del><span class="cx">     JSStringRef pathToLocalResource(JSContextRef, JSStringRef url);
</span><span class="cx">     void queueBackNavigation(int howFarBackward);
</span><span class="cx">     void queueForwardNavigation(int howFarForward);
</span></span></pre></div>
<a id="trunkWebKitToolsDumpRenderTreegtkLayoutTestControllerGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp (47016 => 47017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp        2009-08-11 02:53:53 UTC (rev 47016)
+++ trunk/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp        2009-08-11 02:55:03 UTC (rev 47017)
</span><span class="lines">@@ -362,9 +362,3 @@
</span><span class="cx"> {
</span><span class="cx">     return webkit_web_frame_number_of_active_animations(mainFrame);
</span><span class="cx"> }
</span><del>-
-void LayoutTestController::overridePreference(JSStringRef /* key */, JSStringRef /* value */)
-{
-    // FIXME: implement
-}
-
</del></span></pre></div>
<a id="trunkWebKitToolsDumpRenderTreemacDumpRenderTreemm"></a>
<div class="modfile"><h4>Modified: trunk/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm (47016 => 47017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm        2009-08-11 02:53:53 UTC (rev 47016)
+++ trunk/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm        2009-08-11 02:55:03 UTC (rev 47017)
</span><span class="lines">@@ -354,8 +354,7 @@
</span><span class="cx">     return [@&quot;~/Library/Application Support/DumpRenderTree&quot; stringByExpandingTildeInPath];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-// Called before each test.
-static void resetDefaultsToConsistentValues()
</del><ins>+static void setDefaultsToConsistentValuesForTesting()
</ins><span class="cx"> {
</span><span class="cx">     // Give some clear to undocumented defaults values
</span><span class="cx">     static const int NoFontSmoothing = 0;
</span><span class="lines">@@ -385,6 +384,12 @@
</span><span class="cx">     NSString *path = libraryPathForDumpRenderTree();
</span><span class="cx">     [defaults setObject:[path stringByAppendingPathComponent:@&quot;Databases&quot;] forKey:WebDatabaseDirectoryDefaultsKey];
</span><span class="cx">     [defaults setObject:[path stringByAppendingPathComponent:@&quot;LocalCache&quot;] forKey:WebKitLocalCacheDefaultsKey];
</span><ins>+    NSURLCache *sharedCache =
+        [[NSURLCache alloc] initWithMemoryCapacity:1024 * 1024
+                                      diskCapacity:0
+                                          diskPath:[path stringByAppendingPathComponent:@&quot;URLCache&quot;]];
+    [NSURLCache setSharedURLCache:sharedCache];
+    [sharedCache release];
</ins><span class="cx"> 
</span><span class="cx">     WebPreferences *preferences = [WebPreferences standardPreferences];
</span><span class="cx"> 
</span><span class="lines">@@ -406,39 +411,11 @@
</span><span class="cx">     [preferences setCacheModel:WebCacheModelDocumentBrowser];
</span><span class="cx">     [preferences setXSSAuditorEnabled:NO];
</span><span class="cx"> 
</span><del>-    [preferences setPrivateBrowsingEnabled:NO];
-    [preferences setAuthorAndUserStylesEnabled:YES];
-    [preferences setJavaScriptCanOpenWindowsAutomatically:YES];
-    [preferences setOfflineWebApplicationCacheEnabled:YES];
-    [preferences setDeveloperExtrasEnabled:NO];
-    [preferences setXSSAuditorEnabled:NO];
-    [preferences setLoadsImagesAutomatically:YES];
-    if (persistentUserStyleSheetLocation) {
-        [preferences setUserStyleSheetLocation:[NSURL URLWithString:(NSString *)(persistentUserStyleSheetLocation.get())]];
-        [preferences setUserStyleSheetEnabled:YES];
-    } else
-        [preferences setUserStyleSheetEnabled:NO];
-
</del><span class="cx">     // The back/forward cache is causing problems due to layouts during transition from one page to another.
</span><span class="cx">     // So, turn it off for now, but we might want to turn it back on some day.
</span><span class="cx">     [preferences setUsesPageCache:NO];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-// Called once on DumpRenderTree startup.
-static void setDefaultsToConsistentValuesForTesting()
-{
-    resetDefaultsToConsistentValues();
-
-    NSString *path = libraryPathForDumpRenderTree();
-    NSURLCache *sharedCache =
-        [[NSURLCache alloc] initWithMemoryCapacity:1024 * 1024
-                                      diskCapacity:0
-                                          diskPath:[path stringByAppendingPathComponent:@&quot;URLCache&quot;]];
-    [NSURLCache setSharedURLCache:sharedCache];
-    [sharedCache release];
-
-}
-
</del><span class="cx"> static void crashHandler(int sig)
</span><span class="cx"> {
</span><span class="cx">     char *signalName = strsignal(sig);
</span><span class="lines">@@ -1075,8 +1052,21 @@
</span><span class="cx">     [webView _clearMainFrameName];
</span><span class="cx">     [[webView undoManager] removeAllActions];
</span><span class="cx"> 
</span><del>-    resetDefaultsToConsistentValues();
</del><ins>+    WebPreferences *preferences = [webView preferences];
+    [preferences setPrivateBrowsingEnabled:NO];
+    [preferences setAuthorAndUserStylesEnabled:YES];
+    [preferences setJavaScriptCanOpenWindowsAutomatically:YES];
+    [preferences setOfflineWebApplicationCacheEnabled:YES];
+    [preferences setDeveloperExtrasEnabled:NO];
+    [preferences setXSSAuditorEnabled:NO];
+    [preferences setLoadsImagesAutomatically:YES];
</ins><span class="cx"> 
</span><ins>+    if (persistentUserStyleSheetLocation) {
+        [preferences setUserStyleSheetLocation:[NSURL URLWithString:(NSString *)(persistentUserStyleSheetLocation.get())]];
+        [preferences setUserStyleSheetEnabled:YES];
+    } else
+        [preferences setUserStyleSheetEnabled:NO];
+
</ins><span class="cx">     [[mainFrame webView] setSmartInsertDeleteEnabled:YES];
</span><span class="cx">     [[[mainFrame webView] inspector] setJavaScriptProfilingEnabled:NO];
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebKitToolsDumpRenderTreemacLayoutTestControllerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm (47016 => 47017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm        2009-08-11 02:53:53 UTC (rev 47016)
+++ trunk/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm        2009-08-11 02:55:03 UTC (rev 47017)
</span><span class="lines">@@ -293,17 +293,6 @@
</span><span class="cx">     [[mainFrame webView] _dispatchPendingLoadRequests];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void LayoutTestController::overridePreference(JSStringRef key, JSStringRef value)
-{
-    RetainPtr&lt;CFStringRef&gt; keyCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, key));
-    NSString *keyNS = (NSString *)keyCF.get();
-
-    RetainPtr&lt;CFStringRef&gt; valueCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, value));
-    NSString *valueNS = (NSString *)valueCF.get();
-
-    [[WebPreferences standardPreferences] _setPreferenceForTestWithValue:valueNS forKey:keyNS];
-}
-
</del><span class="cx"> void LayoutTestController::setPersistentUserStyleSheetLocation(JSStringRef jsURL)
</span><span class="cx"> {
</span><span class="cx">     RetainPtr&lt;CFStringRef&gt; urlString(AdoptCF, JSStringCopyCFString(0, jsURL));
</span></span></pre></div>
<a id="trunkWebKitToolsDumpRenderTreewinDumpRenderTreecpp"></a>
<div class="modfile"><h4>Modified: trunk/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp (47016 => 47017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp        2009-08-11 02:53:53 UTC (rev 47016)
+++ trunk/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp        2009-08-11 02:55:03 UTC (rev 47017)
</span><span class="lines">@@ -657,66 +657,6 @@
</span><span class="cx">     return strstr(pathOrURL, &quot;/loading/&quot;) || strstr(pathOrURL, &quot;\\loading\\&quot;);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void resetDefaultsToConsistentValues(IWebPreferences* preferences)
-{
-#ifdef USE_MAC_FONTS
-    static BSTR standardFamily = SysAllocString(TEXT(&quot;Times&quot;));
-    static BSTR fixedFamily = SysAllocString(TEXT(&quot;Courier&quot;));
-    static BSTR sansSerifFamily = SysAllocString(TEXT(&quot;Helvetica&quot;));
-    static BSTR cursiveFamily = SysAllocString(TEXT(&quot;Apple Chancery&quot;));
-    static BSTR fantasyFamily = SysAllocString(TEXT(&quot;Papyrus&quot;));
-#else
-    static BSTR standardFamily = SysAllocString(TEXT(&quot;Times New Roman&quot;));
-    static BSTR fixedFamily = SysAllocString(TEXT(&quot;Courier New&quot;));
-    static BSTR sansSerifFamily = SysAllocString(TEXT(&quot;Arial&quot;));
-    static BSTR cursiveFamily = SysAllocString(TEXT(&quot;Comic Sans MS&quot;)); // Not actually cursive, but it's what IE and Firefox use.
-    static BSTR fantasyFamily = SysAllocString(TEXT(&quot;Times New Roman&quot;));
-#endif
-
-    preferences-&gt;setStandardFontFamily(standardFamily);
-    preferences-&gt;setFixedFontFamily(fixedFamily);
-    preferences-&gt;setSerifFontFamily(standardFamily);
-    preferences-&gt;setSansSerifFontFamily(sansSerifFamily);
-    preferences-&gt;setCursiveFontFamily(cursiveFamily);
-    preferences-&gt;setFantasyFontFamily(fantasyFamily);
-
-    preferences-&gt;setAutosaves(FALSE);
-    preferences-&gt;setDefaultFontSize(16);
-    preferences-&gt;setDefaultFixedFontSize(13);
-    preferences-&gt;setMinimumFontSize(1);
-    preferences-&gt;setJavaEnabled(FALSE);
-    preferences-&gt;setPlugInsEnabled(TRUE);
-    preferences-&gt;setDOMPasteAllowed(TRUE);
-    preferences-&gt;setEditableLinkBehavior(WebKitEditableLinkOnlyLiveWithShiftKey);
-    preferences-&gt;setFontSmoothing(FontSmoothingTypeStandard);
-    preferences-&gt;setUsesPageCache(FALSE);
-    preferences-&gt;setPrivateBrowsingEnabled(FALSE);
-    preferences-&gt;setJavaScriptCanOpenWindowsAutomatically(TRUE);
-    preferences-&gt;setJavaScriptEnabled(TRUE);
-    preferences-&gt;setTabsToLinks(FALSE);
-    preferences-&gt;setShouldPrintBackgrounds(TRUE);
-    preferences-&gt;setLoadsImagesAutomatically(TRUE);
-
-    if (persistentUserStyleSheetLocation) {
-        Vector&lt;wchar_t&gt; urlCharacters(CFStringGetLength(persistentUserStyleSheetLocation.get()));
-        CFStringGetCharacters(persistentUserStyleSheetLocation.get(), CFRangeMake(0, CFStringGetLength(persistentUserStyleSheetLocation.get())), (UniChar *)urlCharacters.data());
-        BSTR url = SysAllocStringLen(urlCharacters.data(), urlCharacters.size());
-        preferences-&gt;setUserStyleSheetLocation(url);
-        SysFreeString(url);
-        preferences-&gt;setUserStyleSheetEnabled(TRUE);
-    } else
-        preferences-&gt;setUserStyleSheetEnabled(FALSE);
-
-    COMPtr&lt;IWebPreferencesPrivate&gt; prefsPrivate(Query, preferences);
-    if (prefsPrivate) {
-        prefsPrivate-&gt;setAuthorAndUserStylesEnabled(TRUE);
-        prefsPrivate-&gt;setDeveloperExtrasEnabled(FALSE);
-        prefsPrivate-&gt;setShouldPaintNativeControls(FALSE); // FIXME - need to make DRT pass with Windows native controls &lt;http://bugs.webkit.org/show_bug.cgi?id=25592&gt;
-        prefsPrivate-&gt;setXSSAuditorEnabled(FALSE);
-        prefsPrivate-&gt;setOfflineWebApplicationCacheEnabled(FALSE);
-    }
-}
-
</del><span class="cx"> static void resetWebViewToConsistentStateBeforeTesting()
</span><span class="cx"> {
</span><span class="cx">     COMPtr&lt;IWebView&gt; webView;
</span><span class="lines">@@ -733,7 +673,6 @@
</span><span class="cx">         webIBActions-&gt;resetPageZoom(0);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-
</del><span class="cx">     COMPtr&lt;IWebPreferences&gt; preferences;
</span><span class="cx">     if (SUCCEEDED(webView-&gt;preferences(&amp;preferences))) {
</span><span class="cx">         preferences-&gt;setPrivateBrowsingEnabled(FALSE);
</span><span class="lines">@@ -891,6 +830,44 @@
</span><span class="cx">     return;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static void initializePreferences(IWebPreferences* preferences)
+{
+#ifdef USE_MAC_FONTS
+    BSTR standardFamily = SysAllocString(TEXT(&quot;Times&quot;));
+    BSTR fixedFamily = SysAllocString(TEXT(&quot;Courier&quot;));
+    BSTR sansSerifFamily = SysAllocString(TEXT(&quot;Helvetica&quot;));
+    BSTR cursiveFamily = SysAllocString(TEXT(&quot;Apple Chancery&quot;));
+    BSTR fantasyFamily = SysAllocString(TEXT(&quot;Papyrus&quot;));
+#else
+    BSTR standardFamily = SysAllocString(TEXT(&quot;Times New Roman&quot;));
+    BSTR fixedFamily = SysAllocString(TEXT(&quot;Courier New&quot;));
+    BSTR sansSerifFamily = SysAllocString(TEXT(&quot;Arial&quot;));
+    BSTR cursiveFamily = SysAllocString(TEXT(&quot;Comic Sans MS&quot;)); // Not actually cursive, but it's what IE and Firefox use.
+    BSTR fantasyFamily = SysAllocString(TEXT(&quot;Times New Roman&quot;));
+#endif
+
+    preferences-&gt;setStandardFontFamily(standardFamily);
+    preferences-&gt;setFixedFontFamily(fixedFamily);
+    preferences-&gt;setSerifFontFamily(standardFamily);
+    preferences-&gt;setSansSerifFontFamily(sansSerifFamily);
+    preferences-&gt;setCursiveFontFamily(cursiveFamily);
+    preferences-&gt;setFantasyFontFamily(fantasyFamily);
+
+    preferences-&gt;setAutosaves(FALSE);
+    preferences-&gt;setJavaEnabled(FALSE);
+    preferences-&gt;setPlugInsEnabled(TRUE);
+    preferences-&gt;setDOMPasteAllowed(TRUE);
+    preferences-&gt;setEditableLinkBehavior(WebKitEditableLinkOnlyLiveWithShiftKey);
+    preferences-&gt;setFontSmoothing(FontSmoothingTypeStandard);
+    preferences-&gt;setUsesPageCache(FALSE);
+
+    SysFreeString(standardFamily);
+    SysFreeString(fixedFamily);
+    SysFreeString(sansSerifFamily);
+    SysFreeString(cursiveFamily);
+    SysFreeString(fantasyFamily);
+}
+
</ins><span class="cx"> static Boolean pthreadEqualCallback(const void* value1, const void* value2)
</span><span class="cx"> {
</span><span class="cx">     return (Boolean)pthread_equal(*(pthread_t*)value1, *(pthread_t*)value2);
</span><span class="lines">@@ -1075,6 +1052,12 @@
</span><span class="cx">     if (FAILED(webView-&gt;setResourceLoadDelegate(sharedResourceLoadDelegate.get())))
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><ins>+    COMPtr&lt;IWebPreferences&gt; preferences;
+    if (FAILED(webView-&gt;preferences(&amp;preferences)))
+        return 0;
+
+    initializePreferences(preferences.get());
+
</ins><span class="cx">     openWindows().append(hostWindow);
</span><span class="cx">     windowToWebViewMap().set(hostWindow, webView);
</span><span class="cx">     return webView;
</span><span class="lines">@@ -1142,6 +1125,18 @@
</span><span class="cx">     sharedEditingDelegate.adoptRef(new EditingDelegate);
</span><span class="cx">     sharedResourceLoadDelegate.adoptRef(new ResourceLoadDelegate);
</span><span class="cx"> 
</span><ins>+    // FIXME - need to make DRT pass with Windows native controls &lt;http://bugs.webkit.org/show_bug.cgi?id=25592&gt;
+    COMPtr&lt;IWebPreferences&gt; tmpPreferences;
+    if (FAILED(WebKitCreateInstance(CLSID_WebPreferences, 0, IID_IWebPreferences, reinterpret_cast&lt;void**&gt;(&amp;tmpPreferences))))
+        return -1;
+    COMPtr&lt;IWebPreferences&gt; standardPreferences;
+    if (FAILED(tmpPreferences-&gt;standardPreferences(&amp;standardPreferences)))
+        return -1;
+    COMPtr&lt;IWebPreferencesPrivate&gt; standardPreferencesPrivate;
+    if (FAILED(standardPreferences-&gt;QueryInterface(&amp;standardPreferencesPrivate)))
+        return -1;
+    standardPreferencesPrivate-&gt;setShouldPaintNativeControls(FALSE);
+
</ins><span class="cx">     COMPtr&lt;IWebView&gt; webView(AdoptCOM, createWebViewAndOffscreenWindow(&amp;webViewWindow));
</span><span class="cx">     if (!webView)
</span><span class="cx">         return -1;
</span></span></pre></div>
<a id="trunkWebKitToolsDumpRenderTreewinLayoutTestControllerWincpp"></a>
<div class="modfile"><h4>Modified: trunk/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp (47016 => 47017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp        2009-08-11 02:53:53 UTC (rev 47016)
+++ trunk/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp        2009-08-11 02:55:03 UTC (rev 47017)
</span><span class="lines">@@ -707,27 +707,6 @@
</span><span class="cx">     databaseManager-&gt;deleteAllDatabases();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void LayoutTestController::overridePreference(JSStringRef key, JSStringRef value)
-{
-    COMPtr&lt;IWebView&gt; webView;
-    if (FAILED(frame-&gt;webView(&amp;webView)))
-        return;
-
-    COMPtr&lt;IWebPreferences&gt; preferences;
-    if (FAILED(webView-&gt;preferences(&amp;preferences)))
-        return;
-
-    COMPtr&lt;IWebPreferencesPrivate&gt; prefsPrivate(Query, preferences);
-    if (!prefsPrivate)
-        return;
-
-    BSTR keyBSTR = JSStringCopyBSTR(key);
-    BSTR valueBSTR = JSStringCopyBSTR(value);
-    prefsPrivate-&gt;setPreferenceForTest(keyBSTR, valueBSTR);
-    SysFreeString(keyBSTR);
-    SysFreeString(valueBSTR);
-}
-
</del><span class="cx"> void LayoutTestController::setDatabaseQuota(unsigned long long quota)
</span><span class="cx"> {
</span><span class="cx">     printf(&quot;ERROR: LayoutTestController::setDatabaseQuota() not implemented\n&quot;);
</span></span></pre></div>
<a id="trunkWebKitToolsDumpRenderTreewxLayoutTestControllerWxcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp (47016 => 47017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp        2009-08-11 02:53:53 UTC (rev 47016)
+++ trunk/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp        2009-08-11 02:55:03 UTC (rev 47017)
</span><span class="lines">@@ -260,9 +260,3 @@
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Implement this.
</span><span class="cx"> }
</span><del>-
-void LayoutTestController::overridePreference(JSStringRef /* key */, JSStringRef /* value */)
-{
-    // FIXME: implement
-}
-
</del></span></pre>
</div>
</div>

</body>
</html>