Back out 054bd8841f4c (bug 1249106) for doing just what it intended, causing devtools tests to fail with "Warning: Failed propType", just a bit too often

This commit is contained in:
Phil Ringnalda 2016-03-03 21:41:32 -08:00
parent fbcae3eafe
commit 4fc06aef08

View File

@ -40,26 +40,6 @@ waitForExplicitFinish();
// Uncomment this pref to dump all devtools emitted events to the console.
// Services.prefs.setBoolPref("devtools.dump.emit", true);
/**
* Watch console messages for failed propType definitions in React components.
*/
const ConsoleObserver = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
observe: function(subject, topic, data) {
var message = subject.wrappedJSObject.arguments[0];
if (/Failed propType/.test(message)) {
ok(false, message);
}
}
};
Services.obs.addObserver(ConsoleObserver, "console-api-log-event", false);
registerCleanupFunction(() => {
Services.obs.removeObserver(ConsoleObserver, "console-api-log-event");
});
function getFrameScript() {
let mm = gBrowser.selectedBrowser.messageManager;
let frameURL = "chrome://devtools/content/shared/frame-script-utils.js";