Index: test/browser/elemHideEmulation.js |
=================================================================== |
--- a/test/browser/elemHideEmulation.js |
+++ b/test/browser/elemHideEmulation.js |
@@ -489,17 +489,17 @@ |
function runTestPseudoClassContains(test, selector, expectations) |
{ |
testDocument.body.innerHTML = `<div id="parent"> |
<div id="middle"> |
<div id="middle1"><div id="inside" class="inside"></div></div> |
</div> |
<div id="sibling"> |
- <div id="tohide">to hide</div> |
+ <div id="tohide">to hide \ud83d\ude42!</div> |
</div> |
<div id="sibling2"> |
<div id="sibling21"><div id="sibling211" class="inside">Ad*</div></div> |
</div> |
</div>`; |
let elems = { |
parent: testDocument.getElementById("parent"), |
middle: testDocument.getElementById("middle"), |
@@ -553,16 +553,30 @@ |
sibling: false, |
sibling2: true, |
toHide: true |
}; |
runTestPseudoClassContains( |
test, "#parent div:-abp-contains(/to\\sHide/i)", expectations); |
}; |
+exports.testPseudoClassContainsRegexpUFlag = function(test) |
+{ |
+ let expectations = { |
+ parent: true, |
+ middle: true, |
+ inside: true, |
+ sibling: false, |
+ sibling2: true, |
+ toHide: true |
+ }; |
+ runTestPseudoClassContains( |
+ test, "#parent div:-abp-contains(/to\\shide\\s.!/u)", expectations); |
Manish Jethani
2018/05/05 02:01:49
With the u flag the dot will match the entire Unic
|
+}; |
+ |
exports.testPseudoClassContainsWildcardNoMatch = function(test) |
{ |
let expectations = { |
parent: true, |
middle: true, |
inside: true, |
sibling: true, |
sibling2: true, |