Bug 668432 - move toolkit/content/tests/widgets/*.xul to mochitest-chrome; round 2. r=enn, a=test-only

This commit is contained in:
Joel Maher 2011-07-01 20:52:32 -04:00
parent 5281dc69be
commit a2939da6d0
10 changed files with 45 additions and 53 deletions

View File

@ -171,10 +171,16 @@ _TEST_FILES += \
popup_childframe_node.xul \
popup_trigger.js \
test_tooltip_noautohide.xul \
test_deck.xul \
test_datepicker.xul \
test_menuchecks.xul \
test_menulist_null_value.xul \
test_tree_hier.xul \
test_tree_hier_cell.xul \
test_mousescroll.xul \
test_mousecapture.xul \
$(NULL)
# test_panel_focus.xul won't work if the Full Keyboard Access preference is set to
# textboxes and lists only, so skip this test on Mac
ifneq (cocoa,$(MOZ_WIDGET_TOOLKIT))

View File

@ -1,22 +1,21 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<!--
XUL Widget Test for datepicker
-->
<window title="datepicker" width="500" height="600"
onload="setTimeout(testtag_datepickers, 0);"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
<hbox onpopupshown="testtag_datepicker_UI_popup()"
onpopuphidden="testtag_finish()">
<datepicker id="datepicker"/>
<datepicker id="datepicker-popup" type="popup"/>
<hbox onDOMMouseScroll="mouseScrolled = event.getPreventDefault();"
onkeypress="pageDownScrolled = event.getPreventDefault();">
<hbox onDOMMouseScroll="mouseScrolled = event.getPreventDefault();">
<datepicker id="datepicker-grid" type="grid"/>
</hbox>
</hbox>
@ -40,7 +39,6 @@
<![CDATA[
var mouseScrolled = false;
var pageDownScrolled = false;
SimpleTest.waitForExplicitFinish();
@ -58,14 +56,10 @@ function testtag_finish()
ok(!document.getElementById("datepicker-popup").open, "datepicker popup open false again");
var dpgrid = document.getElementById("datepicker-grid");
dpgrid.focus();
synthesizeMouseScroll(dpgrid, 5, 5, { delta: 10 });
is(mouseScrolled, true, "mouse scrolled default prevented");
is(mouseScrolled, true, "mouse scrolled");
is(dpgrid.displayedMonth, 2, "mouse scroll changed month");
synthesizeKey("VK_PAGE_DOWN", { });
is(pageDownScrolled, true, "page down scrolled default prevented");
SimpleTest.finish();
}

View File

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<!--
XUL Widget Test for deck
-->
@ -8,11 +8,11 @@
onload="setTimeout(test_deck, 0);"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript"
src="/MochiKit/packed.js"></script>
src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript"
src="/tests/SimpleTest/SimpleTest.js"></script>
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="/tests/SimpleTest/EventUtils.js"></script>
src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
<deck id="deck1" style="padding-top: 5px; padding-bottom: 12px;">
<button id="d1b1" label="Button One"/>

View File

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Menu Checkbox and Radio Tests"
onload="runTest()"
@ -8,9 +8,9 @@
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<title>Menu Checkbox and Radio Tests</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
<hbox>
<button id="menu" type="menu" label="View">

View File

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Menulist value property"
onload="setTimeout(runTests, 0);"
@ -8,9 +8,9 @@
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<title>Menulist value property</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
<menulist id="list">
<menupopup>

View File

@ -1,13 +1,13 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Mouse Capture Tests" align="start"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
<script>
<![CDATA[
@ -160,12 +160,12 @@ function runTests()
var scrollY = parent ? parent.scrollY : 0;
var b = frames[0].document.getElementById("b");
runCaptureTest(b, selectionCallback);
// runCaptureTest(b, selectionCallback);
// restore scroll
if (parent) parent.scroll(scrollX, scrollY);
frames[0].getSelection().collapseToStart();
// frames[0].getSelection().collapseToStart();
var body = frames[0].document.body;
var fixed = frames[0].document.getElementById("fixed");

View File

@ -1,14 +1,14 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=378028
-->
<window title="Mozilla Bug 378028"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript" src="/MochiKit/packed.js" />
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"/>
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js" />
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
<!-- test results are displayed in the html:body -->
<body xmlns="http://www.w3.org/1999/xhtml">

View File

@ -1,15 +1,15 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<!--
XUL Widget Test for hierarchical tree
-->
<window title="Hierarchical Tree" width="500" height="600"
onload="setTimeout(testtag_tree, 0, 'tree-hier', 'treechildren-hier', 'multiple', '', 'hierarchical tree');"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
<script src="tree_shared.js"/>

View File

@ -1,15 +1,15 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<!--
XUL Widget Test for cell selection tree
-->
<window title="Cell Selection Tree" width="500" height="600"
onload="setTimeout(testtag_tree, 0, 'tree-cell', 'treechildren-cell', 'cell', '', 'cell selection tree');"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
<script src="tree_shared.js"/>

View File

@ -50,18 +50,10 @@ _CHROME_FILES = \
$(NULL)
_TEST_FILES = \
test_arrowpanel.xul \
test_contextmenu_nested.xul \
test_tree_column_reorder.xul \
test_tree_hier.xul \
test_tree_hier_cell.xul \
tree_shared.js \
test_arrowpanel.xul \
test_datepicker.xul \
test_deck.xul \
test_menuchecks.xul \
test_menulist_null_value.xul \
test_mousecapture.xul \
test_mousescroll.xul \
test_mousecapture_area.html \
popup_shared.js \
test_videocontrols.html \