mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 544543 - Add some tests for xul textboxes to make sure their basic behavior and appearance does not regress; r=roc
This commit is contained in:
parent
c973cbafab
commit
6b88c58b00
@ -1,3 +1,6 @@
|
||||
# include the XUL reftests
|
||||
include xul/reftest.list
|
||||
|
||||
== newline-1.html newline-ref.html
|
||||
== newline-2.html newline-ref.html
|
||||
== newline-3.html newline-ref.html
|
||||
|
12
layout/reftests/editor/xul/autocomplete-1.xul
Normal file
12
layout/reftests/editor/xul/autocomplete-1.xul
Normal file
@ -0,0 +1,12 @@
|
||||
<?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:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<textbox type="autocomplete" value="test"/>
|
||||
|
||||
</window>
|
13
layout/reftests/editor/xul/autocomplete-ref.xul
Normal file
13
layout/reftests/editor/xul/autocomplete-ref.xul
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
||||
<?xml-stylesheet href="input.css" type="text/css"?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<html:input class="ac" value="test"/>
|
||||
|
||||
</window>
|
22
layout/reftests/editor/xul/empty-1.xul
Normal file
22
layout/reftests/editor/xul/empty-1.xul
Normal file
@ -0,0 +1,22 @@
|
||||
<?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:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests"
|
||||
class="reftest-wait">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
<![CDATA[
|
||||
// Wait for one second so that the emptytext attribute kicks in
|
||||
window.setTimeout(function() {
|
||||
document.documentElement.removeAttribute("class");
|
||||
}, 1000);
|
||||
]]>
|
||||
</script>
|
||||
|
||||
<textbox emptytext="test"/>
|
||||
|
||||
</window>
|
22
layout/reftests/editor/xul/empty-2.xul
Normal file
22
layout/reftests/editor/xul/empty-2.xul
Normal file
@ -0,0 +1,22 @@
|
||||
<?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:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests"
|
||||
class="reftest-wait">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
<![CDATA[
|
||||
// Wait for one second so that the emptytext attribute kicks in
|
||||
window.setTimeout(function() {
|
||||
document.documentElement.removeAttribute("class");
|
||||
}, 1000);
|
||||
]]>
|
||||
</script>
|
||||
|
||||
<textbox emptytext="test" value="value"/>
|
||||
|
||||
</window>
|
13
layout/reftests/editor/xul/empty-ref.xul
Normal file
13
layout/reftests/editor/xul/empty-ref.xul
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
||||
<?xml-stylesheet href="input.css" type="text/css"?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<html:input class="empty" value="test"/>
|
||||
|
||||
</window>
|
12
layout/reftests/editor/xul/emptyautocomplete-1.xul
Normal file
12
layout/reftests/editor/xul/emptyautocomplete-1.xul
Normal file
@ -0,0 +1,12 @@
|
||||
<?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:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<textbox type="autocomplete"/>
|
||||
|
||||
</window>
|
13
layout/reftests/editor/xul/emptyautocomplete-ref.xul
Normal file
13
layout/reftests/editor/xul/emptyautocomplete-ref.xul
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
||||
<?xml-stylesheet href="input.css" type="text/css"?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<html:input class="ac"/>
|
||||
|
||||
</window>
|
13
layout/reftests/editor/xul/emptymultiline-1.xul
Normal file
13
layout/reftests/editor/xul/emptymultiline-1.xul
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
||||
<?xml-stylesheet href="input.css" type="text/css"?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<textbox multiline="true"/>
|
||||
|
||||
</window>
|
13
layout/reftests/editor/xul/emptymultiline-2.xul
Normal file
13
layout/reftests/editor/xul/emptymultiline-2.xul
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
||||
<?xml-stylesheet href="input.css" type="text/css"?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<textbox multiline="true" rows="10"/>
|
||||
|
||||
</window>
|
13
layout/reftests/editor/xul/emptymultiline-ref.xul
Normal file
13
layout/reftests/editor/xul/emptymultiline-ref.xul
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
||||
<?xml-stylesheet href="input.css" type="text/css"?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<html:textarea rows="10"/>
|
||||
|
||||
</window>
|
12
layout/reftests/editor/xul/emptytextbox-1.xul
Normal file
12
layout/reftests/editor/xul/emptytextbox-1.xul
Normal file
@ -0,0 +1,12 @@
|
||||
<?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:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<textbox/>
|
||||
|
||||
</window>
|
12
layout/reftests/editor/xul/emptytextbox-2.xul
Normal file
12
layout/reftests/editor/xul/emptytextbox-2.xul
Normal file
@ -0,0 +1,12 @@
|
||||
<?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:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<textbox type="password"/>
|
||||
|
||||
</window>
|
12
layout/reftests/editor/xul/emptytextbox-3.xul
Normal file
12
layout/reftests/editor/xul/emptytextbox-3.xul
Normal file
@ -0,0 +1,12 @@
|
||||
<?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:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<textbox type="number"/>
|
||||
|
||||
</window>
|
12
layout/reftests/editor/xul/emptytextbox-4.xul
Normal file
12
layout/reftests/editor/xul/emptytextbox-4.xul
Normal file
@ -0,0 +1,12 @@
|
||||
<?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:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<textbox type="search"/>
|
||||
|
||||
</window>
|
12
layout/reftests/editor/xul/emptytextbox-5.xul
Normal file
12
layout/reftests/editor/xul/emptytextbox-5.xul
Normal file
@ -0,0 +1,12 @@
|
||||
<?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:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<textbox type="timed"/>
|
||||
|
||||
</window>
|
13
layout/reftests/editor/xul/emptytextbox-ref.xul
Normal file
13
layout/reftests/editor/xul/emptytextbox-ref.xul
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
||||
<?xml-stylesheet href="input.css" type="text/css"?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<html:input/>
|
||||
|
||||
</window>
|
69
layout/reftests/editor/xul/input.css
Normal file
69
layout/reftests/editor/xul/input.css
Normal file
@ -0,0 +1,69 @@
|
||||
@namespace url('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul');
|
||||
@namespace html url('http://www.w3.org/1999/xhtml');
|
||||
|
||||
#mac html|input, #mac html|textarea {
|
||||
margin: 4px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#win html|input, #win html|textarea {
|
||||
margin: 2px 4px;
|
||||
padding: 2px 2px 3px;
|
||||
-moz-padding-start: 4px;
|
||||
}
|
||||
|
||||
#win html|input:-moz-system-metric(windows-default-theme) {
|
||||
padding: 1px 1px 2px;
|
||||
-moz-padding-start: 3px;
|
||||
}
|
||||
|
||||
#linux html|input, #linux html|textarea {
|
||||
margin: 2px 4px;
|
||||
padding: 2px 4px 3px;
|
||||
}
|
||||
|
||||
textbox[multiline="true"], html|textarea {
|
||||
border: none !important;
|
||||
-moz-appearance: none !important;
|
||||
-moz-border-radius-topright: 0;
|
||||
-moz-border-radius-bottomleft: 0;
|
||||
}
|
||||
|
||||
html|input, html|textarea {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
html|input.ac {
|
||||
padding: 0 3px !important;
|
||||
}
|
||||
|
||||
html|input.empty {
|
||||
color: graytext;
|
||||
}
|
||||
|
||||
html|input.empty:-moz-system-metric(windows-default-theme) {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
html|input.num {
|
||||
text-align: end;
|
||||
}
|
||||
|
||||
#mac html|input.num {
|
||||
-moz-margin-end: 8px;
|
||||
}
|
||||
|
||||
#win html|input.num {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
#linux html|input.num {
|
||||
-moz-margin-end: 3px;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
html|div.plainfield {
|
||||
-moz-margin-start: 1px;
|
||||
color: -moz-fieldtext;
|
||||
}
|
||||
|
12
layout/reftests/editor/xul/number-1.xul
Normal file
12
layout/reftests/editor/xul/number-1.xul
Normal file
@ -0,0 +1,12 @@
|
||||
<?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:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<textbox type="number"/>
|
||||
|
||||
</window>
|
12
layout/reftests/editor/xul/number-2.xul
Normal file
12
layout/reftests/editor/xul/number-2.xul
Normal file
@ -0,0 +1,12 @@
|
||||
<?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:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<textbox type="number" hidespinbuttons="false"/>
|
||||
|
||||
</window>
|
12
layout/reftests/editor/xul/number-3.xul
Normal file
12
layout/reftests/editor/xul/number-3.xul
Normal file
@ -0,0 +1,12 @@
|
||||
<?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:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<textbox type="number" hidespinbuttons="true"/>
|
||||
|
||||
</window>
|
12
layout/reftests/editor/xul/number-4.xul
Normal file
12
layout/reftests/editor/xul/number-4.xul
Normal file
@ -0,0 +1,12 @@
|
||||
<?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:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<textbox type="number" value="1" hidespinbuttons="true"/>
|
||||
|
||||
</window>
|
12
layout/reftests/editor/xul/number-5.xul
Normal file
12
layout/reftests/editor/xul/number-5.xul
Normal file
@ -0,0 +1,12 @@
|
||||
<?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:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<textbox type="number" value="test" hidespinbuttons="true"/>
|
||||
|
||||
</window>
|
13
layout/reftests/editor/xul/number-ref.xul
Normal file
13
layout/reftests/editor/xul/number-ref.xul
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
||||
<?xml-stylesheet href="input.css" type="text/css"?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<html:input value="0" class="num"/>
|
||||
|
||||
</window>
|
12
layout/reftests/editor/xul/numberwithvalue-1.xul
Normal file
12
layout/reftests/editor/xul/numberwithvalue-1.xul
Normal file
@ -0,0 +1,12 @@
|
||||
<?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:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<textbox type="number" value="123" hidespinbuttons="true"/>
|
||||
|
||||
</window>
|
13
layout/reftests/editor/xul/numberwithvalue-ref.xul
Normal file
13
layout/reftests/editor/xul/numberwithvalue-ref.xul
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
||||
<?xml-stylesheet href="input.css" type="text/css"?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<html:input value="123" class="num"/>
|
||||
|
||||
</window>
|
12
layout/reftests/editor/xul/passwd-1.xul
Normal file
12
layout/reftests/editor/xul/passwd-1.xul
Normal file
@ -0,0 +1,12 @@
|
||||
<?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:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<textbox type="password" value="test"/>
|
||||
|
||||
</window>
|
12
layout/reftests/editor/xul/passwd-2.xul
Normal file
12
layout/reftests/editor/xul/passwd-2.xul
Normal file
@ -0,0 +1,12 @@
|
||||
<?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:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<textbox type="password" value="abcd"/>
|
||||
|
||||
</window>
|
12
layout/reftests/editor/xul/passwd-3.xul
Normal file
12
layout/reftests/editor/xul/passwd-3.xul
Normal file
@ -0,0 +1,12 @@
|
||||
<?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:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<textbox value="test"/>
|
||||
|
||||
</window>
|
13
layout/reftests/editor/xul/passwd-ref.xul
Normal file
13
layout/reftests/editor/xul/passwd-ref.xul
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
||||
<?xml-stylesheet href="input.css" type="text/css"?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<html:input type="password" value="test"/>
|
||||
|
||||
</window>
|
12
layout/reftests/editor/xul/plain-1.xul
Normal file
12
layout/reftests/editor/xul/plain-1.xul
Normal file
@ -0,0 +1,12 @@
|
||||
<?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:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<textbox value="test" class="plain"/>
|
||||
|
||||
</window>
|
13
layout/reftests/editor/xul/plain-ref.xul
Normal file
13
layout/reftests/editor/xul/plain-ref.xul
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
||||
<?xml-stylesheet href="input.css" type="text/css"?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<html:div class="plainfield">test</html:div>
|
||||
|
||||
</window>
|
21
layout/reftests/editor/xul/platform.js
Normal file
21
layout/reftests/editor/xul/platform.js
Normal file
@ -0,0 +1,21 @@
|
||||
// The appearance of XUL elements is platform-specific, so we set the
|
||||
// style of the root element according to the platform, so that the
|
||||
// CSS code inside input.css can select the correct styles for each
|
||||
// platform.
|
||||
|
||||
var id;
|
||||
var ua = navigator.userAgent;
|
||||
|
||||
if (/Windows/.test(ua))
|
||||
id = "win";
|
||||
else if (/Linux/.test(ua))
|
||||
id = "linux";
|
||||
else if (/Mac OS X/.test(ua))
|
||||
id = "mac";
|
||||
|
||||
if (id)
|
||||
document.documentElement.setAttribute("id", id);
|
||||
else
|
||||
document.documentElement.appendChild(
|
||||
document.createTextNode("Unrecognized platform")
|
||||
);
|
29
layout/reftests/editor/xul/reftest.list
Normal file
29
layout/reftests/editor/xul/reftest.list
Normal file
@ -0,0 +1,29 @@
|
||||
== empty-1.xul empty-ref.xul
|
||||
!= empty-2.xul empty-ref.xul
|
||||
# There is no way to simulate an autocomplete textbox in windows Vista/7 default theme using CSS.
|
||||
# Therefore, the equlity tests below should be marked as failing.
|
||||
fails-if(windowsDefaultTheme&&/^Windows\x20NT\x206\.[01]$/.test(http.oscpu)) == autocomplete-1.xul autocomplete-ref.xul
|
||||
fails-if(windowsDefaultTheme&&/^Windows\x20NT\x206\.[01]$/.test(http.oscpu)) == emptyautocomplete-1.xul emptyautocomplete-ref.xul
|
||||
!= emptymultiline-1.xul emptymultiline-ref.xul
|
||||
== emptymultiline-2.xul emptymultiline-ref.xul
|
||||
== emptytextbox-1.xul emptytextbox-ref.xul
|
||||
== emptytextbox-2.xul emptytextbox-ref.xul
|
||||
!= emptytextbox-3.xul emptytextbox-ref.xul
|
||||
!= emptytextbox-4.xul emptytextbox-ref.xul
|
||||
== emptytextbox-5.xul emptytextbox-ref.xul
|
||||
# There is no way to simulate a number textbox in windows Vista/7 default theme using CSS.
|
||||
# Therefore, the equlity tests below should be marked as failing.
|
||||
!= number-1.xul number-ref.xul
|
||||
!= number-2.xul number-ref.xul
|
||||
fails-if(windowsDefaultTheme&&/^Windows\x20NT\x206\.[01]$/.test(http.oscpu)) == number-3.xul number-ref.xul
|
||||
!= number-4.xul number-ref.xul
|
||||
fails-if(windowsDefaultTheme&&/^Windows\x20NT\x206\.[01]$/.test(http.oscpu)) == number-5.xul number-ref.xul
|
||||
fails-if(windowsDefaultTheme&&/^Windows\x20NT\x206\.[01]$/.test(http.oscpu)) == numberwithvalue-1.xul numberwithvalue-ref.xul
|
||||
== passwd-1.xul passwd-ref.xul
|
||||
== passwd-2.xul passwd-ref.xul
|
||||
!= passwd-3.xul passwd-ref.xul
|
||||
== plain-1.xul plain-ref.xul
|
||||
== textbox-1.xul textbox-ref.xul
|
||||
!= textbox-disabled.xul textbox-ref.xul
|
||||
# Read-only textboxes look like normal textboxes in windows Vista/7 default theme
|
||||
fails-if(windowsDefaultTheme&&/^Windows\x20NT\x206\.[01]$/.test(http.oscpu)) != textbox-readonly.xul textbox-ref.xul
|
12
layout/reftests/editor/xul/textbox-1.xul
Normal file
12
layout/reftests/editor/xul/textbox-1.xul
Normal file
@ -0,0 +1,12 @@
|
||||
<?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:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<textbox value="test"/>
|
||||
|
||||
</window>
|
12
layout/reftests/editor/xul/textbox-disabled.xul
Normal file
12
layout/reftests/editor/xul/textbox-disabled.xul
Normal file
@ -0,0 +1,12 @@
|
||||
<?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:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<textbox value="test" disabled="true"/>
|
||||
|
||||
</window>
|
12
layout/reftests/editor/xul/textbox-readonly.xul
Normal file
12
layout/reftests/editor/xul/textbox-readonly.xul
Normal file
@ -0,0 +1,12 @@
|
||||
<?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:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<textbox value="test" readonly="true"/>
|
||||
|
||||
</window>
|
13
layout/reftests/editor/xul/textbox-ref.xul
Normal file
13
layout/reftests/editor/xul/textbox-ref.xul
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
||||
<?xml-stylesheet href="input.css" type="text/css"?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
title="Textbox tests">
|
||||
|
||||
<script type="text/javascript" src="platform.js"/>
|
||||
|
||||
<html:input value="test"/>
|
||||
|
||||
</window>
|
@ -305,6 +305,13 @@ function ReadManifest(aURL)
|
||||
}
|
||||
}
|
||||
|
||||
// Set a flag on sandbox if the windows default theme is active
|
||||
var box = document.createElement("box");
|
||||
box.setAttribute("id", "_box_windowsDefaultTheme");
|
||||
document.documentElement.appendChild(box);
|
||||
sandbox.windowsDefaultTheme = (getComputedStyle(box, null).display == "none");
|
||||
document.documentElement.removeChild(box);
|
||||
|
||||
var line = {value:null};
|
||||
var lineNo = 0;
|
||||
var urlprefix = "";
|
||||
|
@ -34,6 +34,14 @@
|
||||
- the terms of any one of the MPL, the GPL or the LGPL.
|
||||
-
|
||||
- ***** END LICENSE BLOCK ***** -->
|
||||
<?xml-stylesheet type="text/css" href="data:text/css,
|
||||
|
||||
#_box_windowsDefaultTheme:-moz-system-metric(windows-default-theme) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
" ?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
id="reftest-window"
|
||||
onload="OnRefTestLoad();"
|
||||
|
Loading…
Reference in New Issue
Block a user