Bug 1145824 - Reset dom.send_after_paint_to_content when toggling gDevTools.testing, as chrome tests need it.

This commit is contained in:
Shu-yu Guo 2015-04-25 15:56:20 -07:00
parent 13889b6bbb
commit a82dfde5ea

View File

@ -70,13 +70,22 @@ DevTools.prototype = {
},
set testing(state) {
let oldState = this._testing;
this._testing = state;
if (state) {
// dom.send_after_paint_to_content is set to true (non-default) in
// testing/profiles/prefs_general.js so lets set it to the same as it is
// in a default browser profile for the duration of the test.
Services.prefs.setBoolPref("dom.send_after_paint_to_content", false);
if (state !== oldState) {
if (state) {
this._savedSendAfterPaintToContentPref =
Services.prefs.getBoolPref("dom.send_after_paint_to_content");
// dom.send_after_paint_to_content is set to true (non-default) in
// testing/profiles/prefs_general.js so lets set it to the same as it is
// in a default browser profile for the duration of the test.
Services.prefs.setBoolPref("dom.send_after_paint_to_content", false);
} else {
Services.prefs.setBoolPref("dom.send_after_paint_to_content",
this._savedSendAfterPaintToContentPref);
}
}
},