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

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

Issue 29728579: Issue 6437 - Apply :-abp-contains() to matching roots only (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Left Patch Set: Rebase Created April 19, 2018, 4:26 p.m.
Right Patch Set: Update tests Created April 19, 2018, 4:28 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « lib/content/elemHideEmulation.js ('k') | 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
(no file at all)
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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 } 509 }
510 510
511 exports.testPseudoClassContainsText = function(test) 511 exports.testPseudoClassContainsText = function(test)
512 { 512 {
513 let expectations = { 513 let expectations = {
514 parent: true, 514 parent: true,
515 middle: true, 515 middle: true,
516 inside: true, 516 inside: true,
517 sibling: false, 517 sibling: false,
518 sibling2: true, 518 sibling2: true,
519 toHide: false 519 toHide: true
520 }; 520 };
521 runTestPseudoClassContains( 521 runTestPseudoClassContains(
522 test, "#parent div:-abp-contains(to hide)", expectations); 522 test, "#parent div:-abp-contains(to hide)", expectations);
523 }; 523 };
524 524
525 exports.testPseudoClassContainsRegexp = function(test) 525 exports.testPseudoClassContainsRegexp = function(test)
526 { 526 {
527 let expectations = { 527 let expectations = {
528 parent: true, 528 parent: true,
529 middle: true, 529 middle: true,
530 inside: true, 530 inside: true,
531 sibling: false, 531 sibling: false,
532 sibling2: true, 532 sibling2: true,
533 toHide: false 533 toHide: true
534 }; 534 };
535 runTestPseudoClassContains( 535 runTestPseudoClassContains(
536 test, "#parent div:-abp-contains(/to\\shide/)", expectations); 536 test, "#parent div:-abp-contains(/to\\shide/)", expectations);
537 }; 537 };
538 538
539 exports.testPseudoClassContainsRegexpIFlag = function(test) 539 exports.testPseudoClassContainsRegexpIFlag = function(test)
540 { 540 {
541 let expectations = { 541 let expectations = {
542 parent: true, 542 parent: true,
543 middle: true, 543 middle: true,
544 inside: true, 544 inside: true,
545 sibling: false, 545 sibling: false,
546 sibling2: true, 546 sibling2: true,
547 toHide: false 547 toHide: true
548 }; 548 };
549 runTestPseudoClassContains( 549 runTestPseudoClassContains(
550 test, "#parent div:-abp-contains(/to\\sHide/i)", expectations); 550 test, "#parent div:-abp-contains(/to\\sHide/i)", expectations);
551 }; 551 };
552 552
553 exports.testPseudoClassContainsWildcardNoMatch = function(test) 553 exports.testPseudoClassContainsWildcardNoMatch = function(test)
554 { 554 {
555 let expectations = { 555 let expectations = {
556 parent: true, 556 parent: true,
557 middle: true, 557 middle: true,
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 expectVisible(test, child2); 692 expectVisible(test, child2);
693 return timeout(REFRESH_INTERVAL); 693 return timeout(REFRESH_INTERVAL);
694 }).then(() => 694 }).then(() =>
695 { 695 {
696 expectHidden(test, parent); 696 expectHidden(test, parent);
697 expectVisible(test, child); 697 expectVisible(test, child);
698 expectHidden(test, sibling); 698 expectHidden(test, sibling);
699 expectVisible(test, child2); 699 expectVisible(test, child2);
700 }).catch(unexpectedError.bind(test)).then(() => test.done()); 700 }).catch(unexpectedError.bind(test)).then(() => test.done());
701 }; 701 };
LEFTRIGHT

Powered by Google App Engine
This is Rietveld