Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Commit 07c1fcc

Browse files
committed
This is an attemped unit-test repro of
#1294 The unit test works properly, so there is no code change in this commit. The bug remains outstanding.
1 parent 0544579 commit 07c1fcc

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

net/instaweb/rewriter/rewrite_options_test.cc

+13
Original file line numberDiff line numberDiff line change
@@ -3323,6 +3323,19 @@ TEST_F(RewriteOptionsTest, MergeAllowVaryOnOptions) {
33233323
VerifyMergingAllowVaryOn("", "", "Auto");
33243324
}
33253325

3326+
TEST_F(RewriteOptionsTest, MergeAllowDisallow) {
3327+
RewriteOptions one(&thread_system_), two(&thread_system_);
3328+
one.Disallow("*");
3329+
EXPECT_FALSE(one.IsAllowed("foobar"));
3330+
EXPECT_FALSE(one.IsAllowed("bar"));
3331+
two.Allow("foo*");
3332+
EXPECT_TRUE(two.IsAllowed("foobar"));
3333+
EXPECT_TRUE(two.IsAllowed("bar"));
3334+
MergeOptions(one, two);
3335+
EXPECT_TRUE(options_.IsAllowed("foobar"));
3336+
EXPECT_FALSE(options_.IsAllowed("bar"));
3337+
}
3338+
33263339
TEST_F(RewriteOptionsTest, ImageQualitiesOverride) {
33273340
options_.set_image_recompress_quality(1);
33283341

0 commit comments

Comments
 (0)