| Index: test/browser/elemHideEmulation.js |
| =================================================================== |
| --- a/test/browser/elemHideEmulation.js |
| +++ b/test/browser/elemHideEmulation.js |
| @@ -236,16 +236,44 @@ |
| ).then(() => |
| { |
| expectVisible(test, parent); |
| expectVisible(test, middle); |
| expectHidden(test, toHide); |
| }).catch(unexpectedError.bind(test)).then(() => test.done()); |
| }; |
| +// |
|
Manish Jethani
2018/07/23 20:44:01
Nit: We don't need these extra blank lines in the
hub
2018/07/23 21:01:57
Done.
|
| +// Add the style. Then added the element for that style. |
|
Manish Jethani
2018/07/23 20:44:01
s/added/add/
hub
2018/07/23 21:01:57
Done.
|
| +// This should retrigger the filter and hide it. |
|
Manish Jethani
2018/07/23 20:44:01
s/filter/filtering/
hub
2018/07/23 21:01:58
Done.
|
| +// |
| +exports.testPropertyPseudoSelectorAddedStyleAndElement = function(test) |
|
Manish Jethani
2018/07/23 20:44:01
s/Added/Add/
hub
2018/07/23 21:01:58
Done.
|
| +{ |
| + let styleElement; |
| + let toHide; |
| + applyElemHideEmulation( |
| + [":-abp-properties(background-color: rgb(0, 0, 0))"] |
| + ).then(() => |
| + { |
| + styleElement = testDocument.createElement("style"); |
| + testDocument.head.appendChild(styleElement); |
| + styleElement.sheet.insertRule("#toHide {background-color: #000}"); |
| + return timeout(REFRESH_INTERVAL); |
| + }).then(() => |
| + { |
| + toHide = createElement(); |
| + toHide.id = "toHide"; |
| + expectVisible(test, toHide); |
| + return timeout(REFRESH_INTERVAL); |
| + }).then(() => |
| + { |
| + expectHidden(test, toHide); |
| + }).catch(unexpectedError.bind(test)).then(() => test.done()); |
| +}; |
| + |
| exports.testPropertySelectorWithWildcard = function(test) |
| { |
| let toHide = createElementWithStyle("{background-color: #000}"); |
| applyElemHideEmulation( |
| [":-abp-properties(*color: rgb(0, 0, 0))"] |
| ).then(() => |
| { |
| expectHidden(test, toHide); |