RESOLVED DUPLICATE of bug 29751 31129
DumpRenderTree can retain preferences state across runs
https://bugs.webkit.org/show_bug.cgi?id=31129
Summary DumpRenderTree can retain preferences state across runs
Kenneth Russell
Reported 2009-11-04 10:46:49 PST
In investigating https://bugs.webkit.org/show_bug.cgi?id=31088 (Add overridePreference call to all WebGL layout tests), the question arose of why the tests were not failing on more machines. After investigation, it looks likely that on the developers' machines and perhaps on the buildbots, a sticky preferences setting was set during one run of the tests, and that setting has been retained for further runs. Here is how to show that the WebPreferences state that is set up in DumpRenderTree.mm persists across runs: 1. In WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm, resetDefaultsToConsistentValues, add the following at the end of the function: [preferences setWebGLEnabled:NO]; 2. In LayoutTests/fast/canvas/webgl/resources/webgl-test.js, comment out the two lines at the top of the file: //if (window.layoutTestController) // layoutTestController.overridePreference("WebKitWebGLEnabled", "1"); 3. run-webkit-tests LayoutTests/fast/canvas/webgl/getActiveTest.html . Note that the test fails because the 3D context could not be fetched from the canvas, because WebGL support is not enabled. 4. Change the line in DumpRenderTree.mm to read [preferences setWebGLEnabled:YES]; 5. run-webkit-tests LayoutTests/fast/canvas/webgl/getActiveTest.html . The test passes. 6. Comment out the line in DumpRenderTree.mm //[preferences setWebGLEnabled:YES]; 7. run-webkit-tests LayoutTests/fast/canvas/webgl/getActiveTest.html . The test passes. This is the bug. It appears that the JavaScript-level call to override the WebKitWebGLEnabled preference does not persist across runs. If it did, that would be a much worse issue. However, it is clear that at least on some machines this preference was set in the context of the DumpRenderTree app once, and that is preventing clean runs of these tests. Plausibly the stickiness comes from the call to [_standardPreferences setAutosaves:YES]; in WebPreferences.mm, standardPreferences. Not sure what the right fix is; possibly to always initialize [preferences setWebGLEnabled:NO]; in DumpRenderTree.mm.
Attachments
Adam Roben (:aroben)
Comment 1 2011-05-26 10:07:23 PDT
One possible way to fix this is to address bug 29751.
Alexey Proskuryakov
Comment 2 2011-05-26 14:23:09 PDT
> possibly to always initialize [preferences setWebGLEnabled:NO]; in DumpRenderTree.mm. That seems like a great targeted fix to me. We initialize most preferences, so why not WebGL?
Kenneth Russell
Comment 3 2011-05-26 16:35:03 PDT
(In reply to comment #2) > > possibly to always initialize [preferences setWebGLEnabled:NO]; in DumpRenderTree.mm. > > That seems like a great targeted fix to me. We initialize most preferences, so why not WebGL? It looks like this was done in r55857 for https://bugs.webkit.org/show_bug.cgi?id=35905 . It's possible this bug is no longer relevant.
Alexey Proskuryakov
Comment 4 2013-10-30 12:48:03 PDT
Let's dupe to bug 29751 then, as this bug's title is now a general one. *** This bug has been marked as a duplicate of bug 29751 ***
Note You need to log in before you can comment on or make changes to this bug.