Bug 1166870 - Fix permissions on settings event tests. a=test-only
authorKyle Machulis <kyle@nonpolynomial.com>
Wed, 20 May 2015 12:09:26 -0700
changeset 267505 f4be1afc1bfe98870859f66d3f9aef4f8554ece7
parent 267504 0a02d104de2a5d51f68d521579386f445593cd86
child 267506 90fba299cd36de1ac4a0eeacddf2bdb65ea28fbc
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstest-only
bugs1166870
milestone39.0
Bug 1166870 - Fix permissions on settings event tests. a=test-only
dom/settings/tests/test_settings_events.html
--- a/dom/settings/tests/test_settings_events.html
+++ b/dom/settings/tests/test_settings_events.html
@@ -7,20 +7,24 @@ https://bugzilla.mozilla.org/show_bug.cg
   <title>Test for Bug 678695</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=678695">Mozilla Bug 678695</a>
 <p id="display"></p>
 <div id="content" style="display: none">
-  
+
 </div>
 <pre id="test">
 <script type="application/javascript">
+SpecialPowers.addPermission("settings-api-read", true, document);
+SpecialPowers.addPermission("settings-api-write", true, document);
+SpecialPowers.addPermission("settings-read", true, document);
+SpecialPowers.addPermission("settings-write", true, document);
 
 /** Test for Bug 678695 **/
 
 var e = new MozSettingsEvent("settingchanged", {settingName: "a", settingValue: 1});
 ok(e, "Should have settings event!");
 is(e.settingName, "a", "Name should be a.");
 is(e.settingValue, 1, "Value should be 1.");