Bug 950550. Test. r=jrmuizel

--HG--
extra : rebase_source : b5d2cc463f423127948a65ddd9567671a67e9250
This commit is contained in:
Nicholas Cameron 2014-01-07 11:27:07 +13:00
parent e2ed561e72
commit 3255d2032d
2 changed files with 18 additions and 0 deletions

View File

@ -13,6 +13,7 @@ using namespace mozilla::gfx;
TestBugs::TestBugs()
{
REGISTER_TEST(TestBugs, CairoClip918671);
REGISTER_TEST(TestBugs, PushPopClip950550);
}
void
@ -67,3 +68,19 @@ TestBugs::CairoClip918671()
}
void
TestBugs::PushPopClip950550()
{
RefPtr<DrawTarget> dt = Factory::CreateDrawTarget(BACKEND_CAIRO,
IntSize(500, 500),
FORMAT_B8G8R8A8);
dt->PushClipRect(Rect(0, 0, 100, 100));
Matrix m(1, 0, 0, 1, 45, -100);
dt->SetTransform(m);
dt->PopClip();
// We fail the test if we assert in this call because our draw target's
// transforms are out of sync.
dt->FillRect(Rect(50, 50, 50, 50), ColorPattern(Color(0.5f, 0, 0, 1.0f)));
}

View File

@ -13,5 +13,6 @@ public:
TestBugs();
void CairoClip918671();
void PushPopClip950550();
};