<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>36033</bug_id>
          
          <creation_ts>2010-03-11 14:33:01 -0800</creation_ts>
          <short_desc>layoutTestController.overridePreference() affects tests after the current test</short_desc>
          <delta_ts>2010-03-13 06:24:58 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>35905</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ddkilzer</cc>
    
    <cc>dimich</cc>
    
    <cc>eric</cc>
    
    <cc>glen</cc>
    
    <cc>gwilson</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>198778</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-03-11 14:33:01 -0800</bug_when>
    <thetext>layoutTestController.overridePreference() changes the setting in [WebPreferences standardPreferences]. This affects both the current test, and all subsequent tests in the same DRT invocation. This is bad.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>198938</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-03-11 22:46:57 -0800</bug_when>
    <thetext>I&apos;m not sure what else it should do, but I&apos;m certainly interested in any suggestions you have.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>199063</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-03-12 08:11:50 -0800</bug_when>
    <thetext>This is really a problem with how WebPreferences work. You can&apos;t currently set a WebPreference without touching +standardPreferences.

One option would be to save a list of prefs changed by overridePreference(), and then undo those changes at the end of the test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>199074</commentid>
    <comment_count>3</comment_count>
    <who name="Glenn Wilson">gwilson</who>
    <bug_when>2010-03-12 08:39:19 -0800</bug_when>
    <thetext>My original version of overridePreference kept a list of modified preferences in WebPreferences to revert to after each test.  Others felt that this was too cumbersome.  I still agree that this is necessary!

This was scrapped in favor of letting DRT just reset relevant preferences itself before each test.  

See bug 20534.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>199090</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-03-12 09:11:17 -0800</bug_when>
    <thetext>If we made WebPreferences copyable, we could just set prefs on a single WebView without affecting the global preferences.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>199289</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-03-12 20:40:09 -0800</bug_when>
    <thetext>&gt; This was scrapped in favor of letting DRT just reset relevant preferences
&gt; itself before each test.  

Everyone CC&apos;ed here probably knows this, but I&apos;ll rephrase this to have all relevant information spelled out: the current design is to reset preferences in resetDefaultsToConsistentValues() function in DumpRenderTree.mm.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>199293</commentid>
    <comment_count>6</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-03-12 21:04:55 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; Everyone CC&apos;ed here probably knows this, but I&apos;ll rephrase this to have all
&gt; relevant information spelled out: the current design is to reset preferences in
&gt; resetDefaultsToConsistentValues() function in DumpRenderTree.mm.

I saw a number of tests overriding preferences (e.g. caret browsing stuff) without corresponding resets in DRT. It&apos;s unfortunate that someone can write a test to change a pref, but then also have to submit a code patch at the same time.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>