Bug 911864 - Add annotations to our XBL tests as-needed. r=smaug, a=bajaj
authorBobby Holley <bobbyholley@gmail.com>
Fri, 01 Nov 2013 15:31:57 +0100
changeset 166489 0f6033849d0026c532dc9a909e4b27d2a936a8be
parent 166488 72ff90fd470bf68b332f2c590a98febf91242cea
child 166490 efe11f1a745210be3d3d458b38a6f73e827af6c8
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug, bajaj
bugs911864
milestone27.0a2
Bug 911864 - Add annotations to our XBL tests as-needed. r=smaug, a=bajaj
content/xbl/test/bug310107-resource.xhtml
content/xbl/test/file_bug481558.xbl
content/xbl/test/file_bug821850.xhtml
content/xbl/test/test_bug371724.xhtml
content/xbl/test/test_bug790265.xhtml
js/xpconnect/tests/mochitest/file_bug795275.xml
--- a/content/xbl/test/bug310107-resource.xhtml
+++ b/content/xbl/test/bug310107-resource.xhtml
@@ -3,17 +3,18 @@
     <style>
       #bar {
         -moz-binding: url("#binding");
       }
     </style>
     <bindings xmlns="http://www.mozilla.org/xbl">
       <binding id="binding">
         <implementation>
-          <property name="prop" readonly="true" onget="return 2;"/>
+          <property name="prop" readonly="true" exposeToUntrustedContent="true"
+            onget="return 2;"/>
         </implementation>
       </binding>
     </bindings>
   </head>
   <!-- Use a timeout so that we get bfcached -->
   <body onload="setTimeout(window.opener.runTest, 100)">
     <div id="bar"></div>
   </body>
--- a/content/xbl/test/file_bug481558.xbl
+++ b/content/xbl/test/file_bug481558.xbl
@@ -2,12 +2,13 @@
           xmlns:xbl="http://www.mozilla.org/xbl"
           xmlns:html="http://www.w3.org/1999/xhtml">
 <binding id="test">
   <content>
     <children/>
     Binding Attached
   </content>
   <implementation>
-    <property name="xblBoundProperty" onget="return 1;"/>
+    <property name="xblBoundProperty" onget="return 1;"
+              exposeToUntrustedContent="true"/>
   </implementation>
 </binding>
 </bindings>
--- a/content/xbl/test/file_bug821850.xhtml
+++ b/content/xbl/test/file_bug821850.xhtml
@@ -60,37 +60,37 @@ https://bugzilla.mozilla.org/show_bug.cg
 
             SimpleTest.finish();
           }
 
           // Hand things off to content. Content will call us back.
           win.go();
         </constructor>
         <field name="primitiveField">2</field>
-        <method name="method">
+        <method name="method" exposeToUntrustedContent="true">
           <parameter name="arg" />
           <body>
             return "method:" + arg;
           </body>
         </method>
-        <method name="passMeAJSObject">
+        <method name="passMeAJSObject" exposeToUntrustedContent="true">
           <parameter name="arg" />
           <body>
             is(typeof arg.prop, 'undefined', "No properties");
             is(Object.getOwnPropertyNames(arg).length, 0, "Should have no own properties");
             try {
               arg.foo = 2;
               ok(true, "Stuff fails silently");
             } catch (e) {
               ok(false, "Stuff should fail silently");
             }
             is(typeof arg.foo, 'undefined', "Shouldn't place props");
           </body>
         </method>
-        <property name="prop">
+        <property name="prop" exposeToUntrustedContent="true">
           <getter>return this._prop;</getter>
           <setter>this._prop = "set:" + val;</setter>
         </property>
       </implementation>
       <handlers>
         <handler event="testevent" action="ok(true, 'called event handler'); finish();"/>
       </handlers>
     </binding>
--- a/content/xbl/test/test_bug371724.xhtml
+++ b/content/xbl/test/test_bug371724.xhtml
@@ -4,17 +4,17 @@
 https://bugzilla.mozilla.org/show_bug.cgi?id=371724
 -->
 <head>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>        
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
   <bindings xmlns="http://www.mozilla.org/xbl">
     <binding id="rd">
       <implementation>
-        <property name="hallo" onget="return true;" readonly="true"/>
+        <property name="hallo" onget="return true;" readonly="true" exposeToUntrustedContent="true"/>
       </implementation>
     </binding>
   </bindings>
 </head>
 <body>
   <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=371724">Mozilla Bug 371724</a>
   <p id="display"></p>
   <div id="content" style="display: none"></div>
--- a/content/xbl/test/test_bug790265.xhtml
+++ b/content/xbl/test/test_bug790265.xhtml
@@ -5,17 +5,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 -->
 <head>
   <title>Test for Bug 790265</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
   <bindings xmlns="http://www.mozilla.org/xbl">
     <binding id="binding">
       <implementation>
-        <method name="foo">
+        <method name="foo" exposeToUntrustedContent="true">
           <body><![CDATA[
             return this;
           ]]></body>
         </method>
       </implementation>
     </binding>
   </bindings>
   <style>
--- a/js/xpconnect/tests/mochitest/file_bug795275.xml
+++ b/js/xpconnect/tests/mochitest/file_bug795275.xml
@@ -1,18 +1,19 @@
 <?xml version="1.0"?>
 <bindings id="xbltestBindings" xmlns="http://www.mozilla.org/xbl"
           xmlns:html="http://www.w3.org/1999/xhtml">
 <binding id="xbltest">
 <implementation>
-<method name="testMethod">
+<method name="testMethod" exposeToUntrustedContent="true">
 <body>
   Components.interfaces;
 </body>
 </method>
 <property name="testProp" readonly="true"
-          onget="Components; return 3;" />
+          onget="Components; return 3;"
+          exposeToUntrustedContent="true" />
 <constructor>
   var foo = Components;
 </constructor>
 </implementation>
 </binding>
 </bindings>