Bug 1005806 - HTMLInputElement.controllers should be [ChromeOnly]. r=bz, a=sledru
--- a/dom/webidl/HTMLInputElement.webidl
+++ b/dom/webidl/HTMLInputElement.webidl
@@ -138,17 +138,17 @@ partial interface HTMLInputElement {
};
// Mozilla extensions
partial interface HTMLInputElement {
[Throws]
void setSelectionRange(long start, long end, optional DOMString direction);
- [GetterThrows]
+ [GetterThrows, ChromeOnly]
readonly attribute nsIControllers controllers;
[GetterThrows]
readonly attribute long textLength;
[ChromeOnly]
sequence<DOMString> mozGetFileNameArray();
[ChromeOnly]
--- a/js/xpconnect/tests/mochitest/mochitest.ini
+++ b/js/xpconnect/tests/mochitest/mochitest.ini
@@ -85,15 +85,16 @@ support-files =
[test_bug871887.html]
[test_bug912322.html]
[test_bug916945.html]
[test_bug92773.html]
[test_bug940783.html]
[test_bug965082.html]
[test_bug960820.html]
[test_bug986542.html]
+[test_bug1005806.html]
[test_crosscompartment_weakmap.html]
[test_frameWrapping.html]
# The JS test component we use below is only available in debug builds.
[test_getWebIDLCaller.html]
skip-if = debug == false
[test_nac.xhtml]
[test_sameOriginPolicy.html]
new file mode 100644
--- /dev/null
+++ b/js/xpconnect/tests/mochitest/test_bug1005806.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=1005806
+-->
+<head>
+ <meta charset="utf-8">
+ <title>Test for Bug 1005806</title>
+ <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1005806">Mozilla Bug 1005806</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+ <input id="ipt"></input>
+</div>
+<pre id="test">
+</pre>
+<script type="application/javascript">
+
+/** Test for Bug 1005806 **/
+is(typeof document.getElementById('ipt').controllers, 'undefined', "Controllers property should not appear for content");
+
+</script>
+</body>
+</html>