Bug 877478 - Move crashtests that now error-out to chrome tests. r=mrbkap

These crashtests now throw, because we run XUL tests in content, and they create
forbidden objects and fail the CanCreateWrapper check. Unfortunately, the
crashtest harness isn't set up to catch onerror. And even if they were, they
wouldn't be testing what they wanted to, because all of the relevant work here
happens in onload.

--HG--
rename : content/xul/content/crashtests/236853.rdf => content/xul/content/test/file_bug236853.rdf
rename : content/xul/templates/src/crashtests/330010-1.rdf => content/xul/templates/tests/chrome/file_bug330010.rdf
rename : content/xul/templates/src/crashtests/329335-1.xul => content/xul/templates/tests/chrome/test_bug329335.xul
rename : content/xul/templates/src/crashtests/330010-1.xul => content/xul/templates/tests/chrome/test_bug330010.xul
This commit is contained in:
Bobby Holley 2013-06-04 19:56:41 -07:00
parent 56f69edd0d
commit 91c205adb7
12 changed files with 83 additions and 39 deletions

View File

@ -1,26 +0,0 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<window
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:svg="http://www.w3.org/2000/svg">
<vbox flex="1">
<svg:svg datasources="236853.rdf" ref="urn:root">
<template>
<rule>
<conditions>
<content uri="?root"/>
<triple subject="?root"
predicate="http://www.ex.org/ex-rdf#nodes"
object="?nodes"/>
<member container="?nodes" child="?node"/>
</conditions>
<action>
<!-- The line below causes Mozilla to crash -->
<svg:text uri="?node" x="64" y="64">Text</svg:text>
</action>
</rule>
</template>
<!--<svg:text x="64" y="64">Text</svg:text>-->
</svg:svg>
</vbox>
</window>

View File

@ -1,5 +1,4 @@
load 107518-1.xml
load 236853.xul
load 252448-1.xul
load 253479-1.xul
load 253479-2.xul

View File

@ -18,6 +18,8 @@ MOCHITEST_FILES = \
MOCHITEST_CHROME_FILES = \
test_bug233643.xul \
test_bug236853.xul \
file_bug236853.rdf \
test_bug398289.html \
398289-resource.xul \
test_bug775972.xul \

View File

@ -0,0 +1,37 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
<window
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:svg="http://www.w3.org/2000/svg">
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript">
<![CDATA[
SimpleTest.waitForExplicitFinish();
window.onload = function() {
ok(true, "Didn't crash");
SimpleTest.finish();
}
]]>
</script>
<vbox flex="1">
<svg:svg datasources="file_bug236853.rdf" ref="urn:root">
<template>
<rule>
<conditions>
<content uri="?root"/>
<triple subject="?root"
predicate="http://www.ex.org/ex-rdf#nodes"
object="?nodes"/>
<member container="?nodes" child="?node"/>
</conditions>
<action>
<!-- The line below causes Mozilla to crash -->
<svg:text uri="?node" x="64" y="64">Text</svg:text>
</action>
</rule>
</template>
<!--<svg:text x="64" y="64">Text</svg:text>-->
</svg:svg>
</vbox>
</window>

View File

@ -1,5 +0,0 @@
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml">
<html:span datasources="0" />
</window>

View File

@ -1,9 +1,6 @@
load 257752-1-recursion.xul
load 329335-1.xul
load 329884-1.xul
skip-if(winWidget||browserIsRemote) HTTP load 330010-1.xul # bugs 742455 and 823470
skip-if(winWidget) load 330012-1.xul # bug 742455
skip-if(winWidget) load 397148-1.xul # bug 742455
load 404346-1.xul
load 415019-1.xul
load 417840-1.xul

View File

@ -227,9 +227,20 @@ MOCHITEST_CHROME_FILES = \
test_tmpl_errors.xul \
test_tmpl_regenerate.xul \
test_bug441785.xul \
test_bug329335.xul \
bug441785-1.rdf \
bug441785-2.rdf \
test_sortservice.xul \
$(NULL)
# bugs 742455 and 823470
ifneq ($(OS_ARCH),WINNT)
MOCHITEST_CHROME_FILES += \
test_bug330010.xul \
file_bug330010.rdf \
$(NULL)
endif
# test_bug397148.xul is disabled because it leaks. See bug 879531.
include $(topsrcdir)/config/rules.mk

View File

@ -1,14 +1,20 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:svg="http://www.w3.org/2000/svg">
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script>
SimpleTest.waitForExplicitFinish();
function init()
{
{
document.documentElement.appendChild(document.getElementById("svg"));
ok(true, "Didn't crash");
SimpleTest.finish();
}
window.addEventListener("load", init, false);

View File

@ -1,23 +1,27 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:html="http://www.w3.org/1999/xhtml"
onload="boom();">
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="text/javascript">
SimpleTest.waitForExplicitFinish();
function boom()
{
var x = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "hbox");
generatedShape = document.getElementById("s").childNodes[3];
generatedShape.appendChild(x);
document.documentElement.removeChild(document.getElementById("s"));
ok(true, "Didn't crash");
SimpleTest.finish();
}
</script>
<html:div datasources="330010-1.rdf" ref="urn:root" flex="1" id="s">
<html:div datasources="file_bug330010.rdf" ref="urn:root" flex="1" id="s">
<template>
<rule>
<conditions>

View File

@ -0,0 +1,19 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml" onload="boom();">
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="text/javascript">
SimpleTest.waitForExplicitFinish();
function boom() {
ok(true, "Didn't crash");
SimpleTest.finish();
}
</script>
<html:span datasources="0" />
</window>