| Index: test/browser/elemHideEmulation.js |
| =================================================================== |
| --- a/test/browser/elemHideEmulation.js |
| +++ b/test/browser/elemHideEmulation.js |
| @@ -479,8 +479,103 @@ |
| applyElemHideEmulation( |
| ["div:-abp-has(:-abp-properties(background-color: rgb(0, 0, 0)))"] |
| ).then(() => |
| { |
| expectVisible(test, child); |
| expectHidden(test, parent); |
| }).catch(unexpectedError.bind(test)).then(() => test.done()); |
| }; |
| + |
| +exports.testDomUpdatesStyle = function(test) |
| +{ |
| + let parent = createElementWithStyle("{}"); |
| + let child = createElementWithStyle("{}", parent); |
| + applyElemHideEmulation( |
| + ["div:-abp-has(:-abp-properties(background-color: rgb(0, 0, 0)))"] |
| + ).then(() => |
| + { |
| + expectVisible(test, child); |
| + expectVisible(test, parent); |
| + |
| + insertStyleRule("body #" + parent.id + " > div { background-color: #000}"); |
| + |
| + return new Promise((resolve, reject) => |
| + { |
| + expectVisible(test, child); |
| + expectVisible(test, parent); |
| + window.setTimeout(() => |
| + { |
| + //expectVisible(test, child); |
|
hub
2017/08/23 01:11:31
This is where test are running into problems. This
|
| + expectHidden(test, parent); |
| + resolve(); |
| + }, 4000); |
| + }); |
| + }).catch(unexpectedError.bind(test)).then(() => test.done()); |
| +}; |
| + |
| +exports.testDomUpdatesContent = function(test) |
| +{ |
| + let parent = createElementWithStyle("{}"); |
| + let child = createElementWithStyle("{}", parent); |
| + applyElemHideEmulation( |
| + ["div:-abp-contains(hide me)"] |
| + ).then(() => |
| + { |
| + expectVisible(test, parent); |
| + expectVisible(test, child); |
| + |
| + child.innerText = "hide me"; |
| + return new Promise((resolve, reject) => |
| + { |
| + expectVisible(test, parent); |
| + expectVisible(test, child); |
| + window.setTimeout(() => |
| + { |
| + expectVisible(test, parent); |
|
hub
2017/08/23 01:11:31
This one not commented out fail.
|
| + expectHidden(test, child); |
| + resolve(); |
| + }, 4000); |
| + }); |
| + }).catch(unexpectedError.bind(test)).then(() => test.done()); |
| +}; |
| + |
| +exports.testDomUpdatesNewElement = function(test) |
| +{ |
| + let parent = createElementWithStyle("{}"); |
| + let child = createElementWithStyle("{ background-color: #000}", parent); |
| + applyElemHideEmulation( |
| + ["div:-abp-has(:-abp-properties(background-color: rgb(0, 0, 0)))"] |
| + ).then(() => |
| + { |
| + expectHidden(test, parent); |
| + expectVisible(test, child); |
| + |
| + let sibling = createElementWithStyle("{}"); |
| + expectVisible(test, sibling); |
| + |
| + return new Promise((resolve, reject) => |
| + { |
| + expectHidden(test, parent); |
| + expectVisible(test, child); |
| + expectVisible(test, sibling); |
| + window.setTimeout(() => |
| + { |
| + expectHidden(test, parent); |
| + //expectVisible(test, child); |
| + //expectVisible(test, sibling); |
| + |
| + let child2 = createElementWithStyle("{ background-color: #000}", |
| + sibling); |
| + expectVisible(test, child2); |
| + window.setTimeout(() => |
| + { |
| + expectHidden(test, parent); |
| + //expectVisible(test, child); |
| + expectHidden(test, sibling); |
| + //expectVisible(test, child2); |
| + |
| + resolve(); |
| + }, 4000); |
| + }, 4000); |
| + }); |
| + }).catch(unexpectedError.bind(test)).then(() => test.done()); |
| +}; |