Bug 457809 preliminary. Fix this test so it doesn't fail when we preload the sheet. r+sr=dbaron

This commit is contained in:
Boris Zbarsky 2009-03-30 11:25:35 -04:00
Родитель 334c1e6359
Коммит 2c0514ea69
2 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -23,6 +23,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=416896
<script class="testbody" type="text/javascript">
/** Test for Bug 416896 **/
// Ensure all of our sheets have unique inners and trigger a rule cascade
// reconstruct for each of them, so that all the rules the inspector APIs see
// will have the right parents. This is basicaly working around bug 253354.
for (var sheetIdx = 0; sheetIdx < document.styleSheets.length; ++sheetIdx) {
document.styleSheets[sheetIdx].insertRule("dummy {}", 0);
}
var inlineSheet = $("i").sheet;
isnot(inlineSheet, null, "Should have sheet here");

Просмотреть файл

@ -1585,7 +1585,7 @@ CSSLoaderImpl::SheetComplete(SheetLoadData* aLoadData, nsresult aStatus)
SheetLoadData* data = datasToNotify[i];
NS_ASSERTION(data && data->mMustNotify, "How did this data get here?");
if (data->mObserver) {
LOG((" Notifying observer 0x%x for data 0x%s. wasAlternate: %d",
LOG((" Notifying observer 0x%x for data 0x%x. wasAlternate: %d",
data->mObserver.get(), data, data->mWasAlternate));
data->mObserver->StyleSheetLoaded(data->mSheet, data->mWasAlternate,
aStatus);