Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: test/browser/elemHideEmulation.js

Issue 30035555: Issue 7428, 7400 - Add test case for nested :-abp-properties() (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Left Patch Set: Added test for 7400 Created April 3, 2019, 6:47 p.m.
Right Patch Set: Moved comments Created April 3, 2019, 7:57 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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-present eyeo GmbH 3 * Copyright (C) 2006-present 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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 middile: true, 522 middile: true,
523 inside: true, 523 inside: true,
524 sibling: true, 524 sibling: true,
525 sibling2: true, 525 sibling2: true,
526 toHide: true 526 toHide: true
527 }; 527 };
528 runTestPseudoClassHasSelectorWithHasAndWithSuffixSibling( 528 runTestPseudoClassHasSelectorWithHasAndWithSuffixSibling(
529 test, "div:-abp-has(> span:-abp-contains(Advertisment))", expectations); 529 test, "div:-abp-has(> span:-abp-contains(Advertisment))", expectations);
530 }; 530 };
531 531
532 // See issue https://issues.adblockplus.org/ticket/7359
533 // and issue https://issues.adblockplus.org/ticket/7428
534 async function runTestQualifier(test, selector) 532 async function runTestQualifier(test, selector)
535 { 533 {
536 testDocument.body.innerHTML = ` 534 testDocument.body.innerHTML = `
537 <style> 535 <style>
538 span::before { 536 span::before {
539 content: "any"; 537 content: "any";
540 } 538 }
541 </style> 539 </style>
542 <div id="toHide"> 540 <div id="toHide">
543 <a> 541 <a>
544 <p> 542 <p>
545 <span></span> 543 <span></span>
546 </p> 544 </p>
547 </a> 545 </a>
548 </div>`; 546 </div>`;
549 547
550 if (await applyElemHideEmulation(test, [selector])) 548 if (await applyElemHideEmulation(test, [selector]))
551 expectHidden(test, testDocument.getElementById("toHide")); 549 expectHidden(test, testDocument.getElementById("toHide"));
552 550
553 test.done(); 551 test.done();
554 } 552 }
555 553
554 // See issue https://issues.adblockplus.org/ticket/7428
556 exports.testPropertySelectorCombinatorQualifier = function(test) 555 exports.testPropertySelectorCombinatorQualifier = function(test)
557 { 556 {
558 runTestQualifier( 557 runTestQualifier(
559 test, 558 test,
560 "div:-abp-has(> a p > :-abp-properties(content: \"any\"))" 559 "div:-abp-has(> a p > :-abp-properties(content: \"any\"))"
561 ); 560 );
562 }; 561 };
563 562
563 // See issue https://issues.adblockplus.org/ticket/7359
564 exports.testPropertySelectorCombinatorQualifierNested = function(test) 564 exports.testPropertySelectorCombinatorQualifierNested = function(test)
565 { 565 {
566 runTestQualifier( 566 runTestQualifier(
567 test, 567 test,
568 "div:-abp-has(> a p:-abp-has(> span:-abp-properties(content: \"any\")))" 568 "div:-abp-has(> a p:-abp-has(> :-abp-properties(content: \"any\")))"
569 ); 569 );
570 }; 570 };
571 571
572 // See issue https://issues.adblockplus.org/ticket/7400 572 // See issue https://issues.adblockplus.org/ticket/7400
573 exports.testPropertySelectorIdenticalTypeQualifier = function(test) 573 exports.testPropertySelectorIdenticalTypeQualifier = function(test)
574 { 574 {
575 runTestQualifier( 575 runTestQualifier(
576 test, 576 test,
577 "div:-abp-has(span:-abp-properties(content: \"any\"))" 577 "div:-abp-has(span:-abp-properties(content: \"any\"))"
578 ); 578 );
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 { 1123 {
1124 if (element.id == "n2" || element.id == "n2_3") 1124 if (element.id == "n2" || element.id == "n2_3")
1125 expectProcessed(test, element, element.id); 1125 expectProcessed(test, element, element.id);
1126 else 1126 else
1127 expectNotProcessed(test, element, element.id); 1127 expectNotProcessed(test, element, element.id);
1128 } 1128 }
1129 } 1129 }
1130 1130
1131 test.done(); 1131 test.done();
1132 }; 1132 };
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld