| Index: test/browser/elemHideEmulation.js |
| =================================================================== |
| --- a/test/browser/elemHideEmulation.js |
| +++ b/test/browser/elemHideEmulation.js |
| @@ -89,27 +89,30 @@ |
| } |
| function createPseudoElementWithStyle(element, pseudo, styleBlock) |
| { |
| insertStyleRule(`#${element.id}${pseudo} ${styleBlock}`); |
| } |
| // Will ensure the class ElemHideEmulation is loaded. |
| -// NOTE: if it never loads, this will probably hang. |
| -function loadElemHideEmulation() |
| +// Pass true when it calls itself. |
| +function loadElemHideEmulation(inside) |
| { |
| if (typeof ElemHideEmulation == "undefined") |
| { |
| + if (inside) |
| + return Promise.reject("Failed to load ElemHideEmulation."); |
| + |
| return loadScript(myUrl + "/../../../lib/common.js").then(() => |
| { |
| return loadScript(myUrl + "/../../../chrome/content/elemHideEmulation.js"); |
| }).then(() => |
| { |
| - return loadElemHideEmulation(); |
| + return loadElemHideEmulation(true); |
| }); |
| } |
| return Promise.resolve(); |
| } |
| // Create a new ElemHideEmulation instance with @selectors. |
| function applyElemHideEmulation(selectors) |