Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: chrome/content/common.js

Issue 6021260119113728: Issue 1571 - Unit tests reference non-existing timeline.js file (Closed)
Patch Set: Created Nov. 16, 2014, midnight
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/content/common.js
===================================================================
--- a/chrome/content/common.js
+++ b/chrome/content/common.js
@@ -78,57 +78,30 @@ function prepareFilterComponents(keepLis
Filter.knownFilters = {__proto__: null};
if (!keepListeners)
{
FilterNotifierGlobal.listeners = [];
}
defaultMatcher.clear();
ElemHide.clear();
-
- try
- {
- // Disable timeline functions, they slow down tests otherwise
- let {TimeLine} = require("timeline");
-
- this._backup.timelineLog = TimeLine.log;
- this._backup.timelineEnter = TimeLine.enter;
- this._backup.timelineLeave = TimeLine.leave;
-
- TimeLine.log = function(){};
- TimeLine.enter = function(){};
- TimeLine.leave = function(){};
- }
- catch(e)
- {
- // TimeLine module might not be present, catch exceptions
- }
}
function restoreFilterComponents()
{
let FilterNotifierGlobal = getModuleGlobal("filterNotifier");
FilterStorage.subscriptions = this._backup.subscriptions;
FilterStorage.knownSubscriptions = this._backup.storageKnown;
Subscription.knownSubscriptions = this._backup.subscriptionsKnown;
Filter.knownFilters = this._backup.filtersKnown;
FilterNotifierGlobal.listeners = this._backup.listeners;
Object.defineProperty(FilterStorage, "sourceFile", {value: this._backup.sourceFile, configurable: true});
scheduleReinit();
-
- if ("timelineLeave" in this._backup)
- {
- let {TimeLine} = require("timeline");
-
- TimeLine.log = this._backup.timelineLog;
- TimeLine.enter = this._backup.timelineEnter;
- TimeLine.leave = this._backup.timelineLeave;
- }
}
// Only reinit our data structures when all the tests are done to prevent
// slowing down text execution
let reinitScheduled = false;
function scheduleReinit()
{
if (reinitScheduled)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld