| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2017 eyeo GmbH | 3 * Copyright (C) 2006-2017 eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 expectVisible(test, sibling2); | 382 expectVisible(test, sibling2); |
| 383 expectHidden(test, toHide); | 383 expectHidden(test, toHide); |
| 384 }).catch(unexpectedError.bind(test)).then(() => test.done()); | 384 }).catch(unexpectedError.bind(test)).then(() => test.done()); |
| 385 } | 385 } |
| 386 | 386 |
| 387 exports.testPseudoClassHasSelectorWithHasAndWithSuffixSibling = function(test) | 387 exports.testPseudoClassHasSelectorWithHasAndWithSuffixSibling = function(test) |
| 388 { | 388 { |
| 389 runTestPseudoClassHasSelectorWithHasAndWithSuffixSibling(test, "div:-abp-has(:
-abp-has(div.inside)) + div > div"); | 389 runTestPseudoClassHasSelectorWithHasAndWithSuffixSibling(test, "div:-abp-has(:
-abp-has(div.inside)) + div > div"); |
| 390 }; | 390 }; |
| 391 | 391 |
| 392 exports.testPseudoClassHasSelectorWithHasAndWithSuffixSibling2 = function(test) | |
| 393 { | |
| 394 runTestPseudoClassHasSelectorWithHasAndWithSuffixSibling(test, "div:-abp-has(:
-abp-has(> div.inside)) + div > div"); | |
| 395 }; | |
| 396 | |
| 397 exports.testPseudoClassHasSelectorWithPropSelector = function(test) | 392 exports.testPseudoClassHasSelectorWithPropSelector = function(test) |
| 398 { | 393 { |
| 399 let parent = createElementWithStyle("{}"); | 394 let parent = createElementWithStyle("{}"); |
| 400 let child = createElementWithStyle("{background-color: #000}", parent); | 395 let child = createElementWithStyle("{background-color: #000}", parent); |
| 401 applyElemHideEmulation( | 396 applyElemHideEmulation( |
| 402 ["div:-abp-has(:-abp-properties(background-color: rgb(0, 0, 0)))"] | 397 ["div:-abp-has(:-abp-properties(background-color: rgb(0, 0, 0)))"] |
| 403 ).then(() => | 398 ).then(() => |
| 404 { | 399 { |
| 405 expectVisible(test, child); | 400 expectVisible(test, child); |
| 406 expectHidden(test, parent); | 401 expectHidden(test, parent); |
| 407 }).catch(unexpectedError.bind(test)).then(() => test.done()); | 402 }).catch(unexpectedError.bind(test)).then(() => test.done()); |
| 408 }; | 403 }; |
| 404 |
| 405 exports.testPseudoClassHasSelectorWithPropSelector2 = function(test) |
| 406 { |
| 407 let parent = createElementWithStyle("{}"); |
| 408 let child = createElementWithStyle("{}", parent); |
| 409 insertStyleRule("body #" + parent.id + " > div { background-color: #000}"); |
| 410 applyElemHideEmulation( |
| 411 ["div:-abp-has(:-abp-properties(background-color: rgb(0, 0, 0)))"] |
| 412 ).then(() => |
| 413 { |
| 414 expectVisible(test, child); |
| 415 expectHidden(test, parent); |
| 416 }).catch(unexpectedError.bind(test)).then(() => test.done()); |
| 417 }; |
| OLD | NEW |