зеркало из https://github.com/mozilla/gecko-dev.git
Remove debugging code for debugging bug 536603 (changeset 76e9dfaba122 and changeset 5275dda44819).
This commit is contained in:
Родитель
cbcdcdd806
Коммит
e40f085c42
|
@ -80,46 +80,6 @@
|
|||
/** Test for Bug 524223 **/
|
||||
function check_iframe(ifr) {
|
||||
var doc = ifr.contentDocument;
|
||||
|
||||
// To debug bug 536603, check the imported style rules in the iframe.
|
||||
netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserWrite');
|
||||
var parentSheet = doc.getElementsByTagName("style")[1].sheet;
|
||||
for (var idx = 0; idx < parentSheet.cssRules.length; ++idx) {
|
||||
var rule = parentSheet.cssRules[idx];
|
||||
var ch = rule.href.indexOf("ccd.sjs?");
|
||||
var id = rule.href.substring(ch + 8).substring(0,4);
|
||||
if (rule.styleSheet) {
|
||||
var rl = rule.styleSheet.cssRules;
|
||||
if (rl.length > 0) {
|
||||
var lastRule = rl[rl.length - 1];
|
||||
is(lastRule.selectorText, "#" + id,
|
||||
"selector text for rule @import-ed at " + rule.href + " that specifies color " + lastRule.style.backgroundColor);
|
||||
} else {
|
||||
ok(true, "@import rule importing " + rule.href + " has no rules");
|
||||
}
|
||||
} else {
|
||||
ok(true, "@import rule importing " + rule.href + " has no sheet");
|
||||
}
|
||||
}
|
||||
var links = doc.getElementsByTagName("link");
|
||||
for (idx = 0; idx < links.length; ++idx) {
|
||||
var link = links[idx];
|
||||
var ch = link.href.indexOf("ccd.sjs?");
|
||||
var id = link.href.substring(ch + 8).substring(0,4);
|
||||
if (link.sheet) {
|
||||
var rl = link.sheet.cssRules;
|
||||
if (rl.length > 0) {
|
||||
var lastRule = rl[rl.length - 1];
|
||||
is(lastRule.selectorText, "#" + id,
|
||||
"selector text for rule <link>ed at " + link.href + " that specifies color " + lastRule.style.backgroundColor);
|
||||
} else {
|
||||
ok(true, "<link>ed rule at " + link.href + " has no rules");
|
||||
}
|
||||
} else {
|
||||
ok(true, "<link>ed rule at " + link.href + " has no sheet");
|
||||
}
|
||||
}
|
||||
|
||||
var cases = doc.getElementsByTagName("p");
|
||||
for (var i = 0; i < cases.length; i++) {
|
||||
var color = doc.defaultView.getComputedStyle(cases[i], "")
|
||||
|
@ -133,11 +93,7 @@ SimpleTest.waitForExplicitFinish();
|
|||
window.onload = function() {
|
||||
check_iframe(document.getElementById("quirks"));
|
||||
check_iframe(document.getElementById("standards"));
|
||||
setTimeout(function() {
|
||||
check_iframe(document.getElementById("quirks"));
|
||||
check_iframe(document.getElementById("standards"));
|
||||
SimpleTest.finish();
|
||||
}, 5000);
|
||||
SimpleTest.finish();
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
|
|
Загрузка…
Ссылка в новой задаче