Bug 1005806 - HTMLInputElement.controllers should be [ChromeOnly]. r=bz, a=sledru
authorBobby Holley <bobbyholley@gmail.com>
Mon, 05 May 2014 10:49:24 -0700
changeset 192211 02e1dd202d67
parent 192210 3c51501a4e52
child 192212 b431c1c19a26
push id3524
push userryanvm@gmail.com
push date2014-05-06 13:39 +0000
treeherdermozilla-beta@02e1dd202d67 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz, sledru
bugs1005806
milestone30.0
Bug 1005806 - HTMLInputElement.controllers should be [ChromeOnly]. r=bz, a=sledru
dom/webidl/HTMLInputElement.webidl
js/xpconnect/tests/mochitest/mochitest.ini
js/xpconnect/tests/mochitest/test_bug1005806.html
--- 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>