| Index: test/FilterEngine.cpp | 
| =================================================================== | 
| --- a/test/FilterEngine.cpp | 
| +++ b/test/FilterEngine.cpp | 
| @@ -202,6 +202,30 @@ | 
| ASSERT_EQ(AdblockPlus::Filter::TYPE_BLOCKING, match12->GetType()); | 
| } | 
| +TEST_F(FilterEngineTest, MatchesWithFrameStructure) | 
| +{ | 
| + filterEngine->GetFilter("adbanner.gif")->AddToList(); | 
| + filterEngine->GetFilter("@@adbanner.gif$domain=example.org")->AddToList(); | 
| 
 
Wladimir Palant
2013/10/30 07:39:56
@@||example.org^$document is the exception rule yo
 
 | 
| + | 
| + std::vector<std::string> documentUrls1; | 
| + documentUrls1.push_back("http://ads.com/frame/"); | 
| + documentUrls1.push_back("http://example.com/"); | 
| + AdblockPlus::FilterPtr match1 = | 
| + filterEngine->Matches("http://ads.com/adbanner.gif", "IMAGE", | 
| + documentUrls1); | 
| + ASSERT_TRUE(match1); | 
| + ASSERT_EQ(AdblockPlus::Filter::TYPE_BLOCKING, match1->GetType()); | 
| + | 
| + std::vector<std::string> documentUrls2; | 
| + documentUrls2.push_back("http://ads.com/frame/"); | 
| + documentUrls2.push_back("http://example.org/"); | 
| + AdblockPlus::FilterPtr match2 = | 
| + filterEngine->Matches("http://ads.com/adbanner.gif", "IMAGE", | 
| + documentUrls2); | 
| + ASSERT_TRUE(match2); | 
| + ASSERT_EQ(AdblockPlus::Filter::TYPE_EXCEPTION, match2->GetType()); | 
| +} | 
| + | 
| TEST_F(FilterEngineTest, FirstRunFlag) | 
| { | 
| ASSERT_FALSE(filterEngine->IsFirstRun()); |