Left: | ||
Right: |
LEFT | RIGHT |
---|---|
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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
406 </div> | 406 </div> |
407 </div>`; | 407 </div>`; |
408 let parent = document.getElementById("parent"); | 408 let parent = document.getElementById("parent"); |
409 let middle = document.getElementById("middle"); | 409 let middle = document.getElementById("middle"); |
410 let inside = document.getElementById("inside"); | 410 let inside = document.getElementById("inside"); |
411 let sibling = document.getElementById("sibling"); | 411 let sibling = document.getElementById("sibling"); |
412 let sibling2 = document.getElementById("sibling2"); | 412 let sibling2 = document.getElementById("sibling2"); |
413 let toHide = document.getElementById("tohide"); | 413 let toHide = document.getElementById("tohide"); |
414 | 414 |
415 applyElemHideEmulation( | 415 applyElemHideEmulation( |
416 ["div > div > :-abp-contains(to hide)"] | 416 ["#parent div:-abp-contains(to hide)"] |
Wladimir Palant
2017/06/28 10:47:24
How about "#parent > div:-abp-contains(to hide)"?
Wladimir Palant
2017/06/28 14:53:56
Did you overlook this comment?
hub
2017/06/28 16:11:35
I did. but "#parent > div:-abp-contains(to hide)"
| |
417 ).then(() => | 417 ).then(() => |
418 { | 418 { |
419 expectVisible(test, parent); | 419 expectVisible(test, parent); |
420 expectVisible(test, middle); | 420 expectVisible(test, middle); |
421 expectVisible(test, inside); | 421 expectVisible(test, inside); |
422 expectVisible(test, sibling); | 422 expectHidden(test, sibling); |
423 expectVisible(test, sibling2); | 423 expectVisible(test, sibling2); |
424 expectHidden(test, toHide); | 424 expectHidden(test, toHide); |
425 }).catch(unexpectedError.bind(test)).then(() => test.done()); | 425 }).catch(unexpectedError.bind(test)).then(() => test.done()); |
426 }; | 426 }; |
427 | 427 |
428 exports.testPseudoClassHasSelectorWithPropSelector = function(test) | 428 exports.testPseudoClassHasSelectorWithPropSelector = function(test) |
429 { | 429 { |
430 let parent = createElementWithStyle("{}"); | 430 let parent = createElementWithStyle("{}"); |
431 let child = createElementWithStyle("{background-color: #000}", parent); | 431 let child = createElementWithStyle("{background-color: #000}", parent); |
432 applyElemHideEmulation( | 432 applyElemHideEmulation( |
433 ["div:-abp-has(:-abp-properties(background-color: rgb(0, 0, 0)))"] | 433 ["div:-abp-has(:-abp-properties(background-color: rgb(0, 0, 0)))"] |
434 ).then(() => | 434 ).then(() => |
435 { | 435 { |
436 expectVisible(test, child); | 436 expectVisible(test, child); |
437 expectHidden(test, parent); | 437 expectHidden(test, parent); |
438 }).catch(unexpectedError.bind(test)).then(() => test.done()); | 438 }).catch(unexpectedError.bind(test)).then(() => test.done()); |
439 }; | 439 }; |
LEFT | RIGHT |