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

Side by Side Diff: test/browser/elemHideEmulation.js

Issue 29486558: Issue 5404 - :-abp-properties() nested within :-abp-has() should work if the relevant selector refe… (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created July 11, 2017, 10:20 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/content/elemHideEmulation.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
hub 2017/07/11 17:19:34 you are removing this test because it fails, but :
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 };
OLDNEW
« no previous file with comments | « chrome/content/elemHideEmulation.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld