Bug 477667: manifest attribute not handled in xhtml. r+sr=jst

This commit is contained in:
Dave Camp 2009-02-09 22:40:40 -08:00
parent b30257f34d
commit 1981fa22ce
3 changed files with 41 additions and 0 deletions

View File

@ -1000,6 +1000,12 @@ nsXMLContentSink::SetDocElement(PRInt32 aNameSpaceID,
// find a parent content node to append to, which is fine.
return PR_FALSE;
}
if (aTagName == nsGkAtoms::html &&
aNameSpaceID == kNameSpaceID_XHTML) {
ProcessOfflineManifest(aContent);
}
return PR_TRUE;
}

View File

@ -107,6 +107,7 @@ _TEST_FILES = \
changingManifest.cacheManifest \
changingManifest.cacheManifest^headers^ \
offlineChild.html \
test_xhtmlManifest.xhtml \
$(NULL)
libs:: $(_TEST_FILES)

View File

@ -0,0 +1,34 @@
<html xmlns="http://www.w3.org/1999/xhtml" manifest="http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/simpleManifest.cacheManifest">
<head>
<title>xhtml manifest test</title>
<script type="text/javascript" src="/MochiKit/packed.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="/tests/dom/tests/mochitest/ajax/offline/offlineTests.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<script type="text/javascript">
function manifestUpdated()
{
OfflineTest.ok(true, "Application cache updated.");
OfflineTest.teardown();
OfflineTest.finish();
}
if (OfflineTest.setup()) {
applicationCache.onerror = OfflineTest.failEvent;
applicationCache.oncached = OfflineTest.priv(manifestUpdated);
}
SimpleTest.waitForExplicitFinish();
</script>
</head>
<body>
</body>
</html>