| OLD | NEW | 
|    1 (function() |    1 (function() | 
|    2 { |    2 { | 
|    3   let server = null; |    3   let server = null; | 
|    4   let frame = null; |    4   let frame = null; | 
|    5  |    5  | 
|    6   module("Element hiding", { |    6   module("Element hiding", { | 
|    7     setup: function() |    7     setup: function() | 
|    8     { |    8     { | 
|    9       prepareFilterComponents.call(this); |    9       prepareFilterComponents.call(this); | 
|   10       preparePrefs.call(this); |   10       preparePrefs.call(this); | 
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  129           equal(doc.getElementById("test1").offsetHeight > 0 ? "visible" : "hidd
     en", expected[0], "First element visible"); |  129           equal(doc.getElementById("test1").offsetHeight > 0 ? "visible" : "hidd
     en", expected[0], "First element visible"); | 
|  130           equal(doc.getElementById("test2").offsetHeight > 0 ? "visible" : "hidd
     en", expected[1], "Second element visible"); |  130           equal(doc.getElementById("test2").offsetHeight > 0 ? "visible" : "hidd
     en", expected[1], "Second element visible"); | 
|  131  |  131  | 
|  132           start(); |  132           start(); | 
|  133         }); |  133         }); | 
|  134       }; |  134       }; | 
|  135       frame.contentWindow.location.href = "http://localhost:1234/test"; |  135       frame.contentWindow.location.href = "http://localhost:1234/test"; | 
|  136     } |  136     } | 
|  137     FilterNotifier.addListener(listener); |  137     FilterNotifier.addListener(listener); | 
|  138  |  138  | 
|  139     for each (let filter in filters) |  139     for (let filter of filters) | 
|  140       ElemHide.add(Filter.fromText(filter)); |  140       ElemHide.add(Filter.fromText(filter)); | 
|  141     ElemHide.isDirty = true; |  141     ElemHide.isDirty = true; | 
|  142     ElemHide.apply(); |  142     ElemHide.apply(); | 
|  143   } |  143   } | 
|  144  |  144  | 
|  145   let stageDescriptions = { |  145   let stageDescriptions = { | 
|  146     1: "running without exceptions", |  146     1: "running without exceptions", | 
|  147     2: "running with whitelisted document", |  147     2: "running with whitelisted document", | 
|  148     3: "running with exception not applying to documents", |  148     3: "running with exception not applying to documents", | 
|  149     4: "running with element hiding exception", |  149     4: "running with element hiding exception", | 
|  150   }; |  150   }; | 
|  151  |  151  | 
|  152   for (let test = 0; test < tests.length; test++) |  152   for (let test = 0; test < tests.length; test++) | 
|  153   { |  153   { | 
|  154     let [filters, expected] = tests[test]; |  154     let [filters, expected] = tests[test]; | 
|  155     for (let stage = 1; stage in stageDescriptions; stage++) |  155     for (let stage = 1; stage in stageDescriptions; stage++) | 
|  156       asyncTest(filters.join(", ") + " (" + stageDescriptions[stage] + ")", runT
     est.bind(null, tests[test], stage)); |  156       asyncTest(filters.join(", ") + " (" + stageDescriptions[stage] + ")", runT
     est.bind(null, tests[test], stage)); | 
|  157   } |  157   } | 
|  158 })(); |  158 })(); | 
| OLD | NEW |