@@ -130,6 +130,28 @@ final class RuleConverterTests: XCTestCase {
130
130
XCTAssertEqual ( res, [ exp] ) ;
131
131
}
132
132
133
+ func testUboThirdPartyModifiers( ) {
134
+ var exp = " ||video.example.org^$third-party,match-case " as NSString ;
135
+ var res = ruleConverter. convertRule ( rule: " ||video.example.org^$3p,match-case " as NSString ) ;
136
+ XCTAssertEqual ( res, [ exp] ) ;
137
+
138
+ exp = " ||video.example.org^$match-case,third-party " ;
139
+ res = ruleConverter. convertRule ( rule: " ||video.example.org^$match-case,3p " as NSString ) ;
140
+ XCTAssertEqual ( res, [ exp] ) ;
141
+
142
+ exp = " ||video.example.org^$first-party " ;
143
+ res = ruleConverter. convertRule ( rule: " ||video.example.org^$1p " as NSString ) ;
144
+ XCTAssertEqual ( res, [ exp] ) ;
145
+
146
+ exp = " ||video.example.org^$first-party " ;
147
+ res = ruleConverter. convertRule ( rule: " ||video.example.org^$first-party " as NSString ) ;
148
+ XCTAssertEqual ( res, [ exp] ) ;
149
+
150
+ exp = " ||video.example.org^$match-case,third-party,redirect=noopmp4-1s,media " ;
151
+ res = ruleConverter. convertRule ( rule: " ||video.example.org^$match-case,3p,mp4 " as NSString ) ;
152
+ XCTAssertEqual ( res, [ exp] ) ;
153
+ }
154
+
133
155
func testConvertUboScriptTags( ) {
134
156
var exp = " example.com##^script:some-another-rule(test) " as NSString ;
135
157
var res = ruleConverter. convertRule ( rule: " example.com##^script:some-another-rule(test) " as NSString ) ;
@@ -237,6 +259,7 @@ final class RuleConverterTests: XCTestCase {
237
259
( " testConvertCssAGRules " , testConvertCssAGRules) ,
238
260
( " testEmptyAndMp4Modifiers " , testEmptyAndMp4Modifiers) ,
239
261
( " testMp4AndMediaModifiers " , testMp4AndMediaModifiers) ,
262
+ ( " testUboThirdPartyModifiers " , testUboThirdPartyModifiers) ,
240
263
( " testConvertUboScriptTags " , testConvertUboScriptTags) ,
241
264
( " testInlineScriptModifier " , testInlineScriptModifier) ,
242
265
( " testInlineFontModifier " , testInlineFontModifier) ,
0 commit comments