static void compareStyleSheets(const SheetVector& oldStyleSheets, const SheetVector& newStyleSheets, const ContentsVector& expAddedSheets, UpdateType testUpdateType) { ContentsVector addedSheets; UpdateType updateType = static_cast<UpdateType>(TreeScopeStyleSheetCollection::compareStyleSheets(oldStyleSheets, newStyleSheets, addedSheets)); EXPECT_EQ(testUpdateType, updateType); EXPECT_EQ(expAddedSheets.size(), addedSheets.size()); if (expAddedSheets.size() == addedSheets.size()) { for (unsigned i = 0; i < addedSheets.size(); i++) EXPECT_EQ(expAddedSheets.at(i), addedSheets.at(i)); } }