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

Side by Side Diff: chrome/content/tests/tests/suffixTreeManipulation.js

Issue 8554013: Renamed necessary components for ABP integration (Closed)
Patch Set: Created Oct. 10, 2012, 1:59 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/content/options.js ('k') | chrome/content/typedItOptIn.xul » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 (function() 1 (function()
2 { 2 {
3 function getModuleGlobal(module) 3 function getModuleGlobal(module)
4 { 4 {
5 let result = Cu.getGlobalForObject(require(module)); 5 let result = Cu.getGlobalForObject(require(module));
6 if (result == window) 6 if (result == window)
7 { 7 {
8 // Work-around for bug 736316 - getGlobalForObject gave us our own window 8 // Work-around for bug 736316 - getGlobalForObject gave us our own window
9 let {XPIProvider} = Cu.import("resource://gre/modules/XPIProvider.jsm", nu ll); 9 let {XPIProvider} = Cu.import("resource://gre/modules/XPIProvider.jsm", nu ll);
10 let addonID = "{0fa2149e-bb2c-4ac2-a8d3-479599819475}"; 10 let addonID = "{0fa2149e-bb2c-4ac2-a8d3-479599819475}";
11 if (addonID in XPIProvider.bootstrapScopes) 11 if (addonID in XPIProvider.bootstrapScopes)
12 result = XPIProvider.bootstrapScopes[addonID]; 12 result = XPIProvider.bootstrapScopes[addonID];
13 } 13 }
14 14
15 if ("require" in result) 15 if ("require" in result)
16 result = result.require.scopes[module]; 16 result = result.require.scopes[module];
17 return result; 17 return result;
18 } 18 }
19 19
20 let {onWhitelistEntryAdded, onWhitelistEntryRemoved} = require("rules"); 20 let {onWhitelistEntryAdded, onWhitelistEntryRemoved} = require("typoRules");
21 let rulesGlobal = getModuleGlobal("rules"); 21 let rulesGlobal = getModuleGlobal("typoRules");
22 22
23 function saveRules() 23 function saveRules()
24 { 24 {
25 this._rulesBackup = rulesGlobal.rules; 25 this._rulesBackup = rulesGlobal.rules;
26 rulesGlobal.rules = {domain: {}}; 26 rulesGlobal.rules = {domain: {}};
27 } 27 }
28 28
29 function restoreRules() 29 function restoreRules()
30 { 30 {
31 rulesGlobal.rules = this._rulesBackup; 31 rulesGlobal.rules = this._rulesBackup;
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 "o": { 196 "o": {
197 "o": { 197 "o": {
198 "f": { 198 "f": {
199 }, 199 },
200 "g": " 1234" 200 "g": " 1234"
201 } 201 }
202 } 202 }
203 }, "Attempted to remove goo"); 203 }, "Attempted to remove goo");
204 }); 204 });
205 })(); 205 })();
OLDNEW
« no previous file with comments | « chrome/content/options.js ('k') | chrome/content/typedItOptIn.xul » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld