Bug 1081990 - Reindent. r=gabor
authorBobby Holley <bobbyholley@gmail.com>
Sat, 18 Oct 2014 11:02:09 +0200
changeset 211109 7383d7a819fd4d72706e7e34e825fe976b30c385
parent 211108 5d6eec6916363291eedb1bb36d836662620d8c80
child 211110 aa887bd167cd16b83c04450c99dbb5bb18b0275a
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersgabor
bugs1081990
milestone36.0a1
Bug 1081990 - Reindent. r=gabor
dom/xbl/test/file_bug821850.xhtml
--- a/dom/xbl/test/file_bug821850.xhtml
+++ b/dom/xbl/test/file_bug821850.xhtml
@@ -213,56 +213,56 @@ https://bugzilla.mozilla.org/show_bug.cg
 
     // Tamper with the derived object. This doesn't affect the XBL scope thanks
     // to Xrays.
     bound.method = function() { return "heh"; };
     Object.defineProperty(bound, 'method', {value: function() { return "hah" }});
     Object.defineProperty(bound, 'prop', {value: "redefined"});
     bound.primitiveField = 321;
 
-      // Untrusted events should not trigger event handlers without
-      // exposeToUntrustedContent=true.
-      window.triggeredTrustedHandler = false;
-      var untrustedEvent = new CustomEvent('testtrusted');
-      is(untrustedEvent.type, 'testtrusted', "Constructor should see type");
-      bound.dispatchEvent(untrustedEvent);
-      ok(!window.triggeredTrustedHandler, "untrusted events should not trigger trusted handler");
-      var trustedEvent = new CustomEvent('testtrusted');
-      is(trustedEvent.type, 'testtrusted', "Wrapped constructor should see type");
-      SpecialPowers.wrap(bound).dispatchEvent(trustedEvent); // Dispatch over SpecialPowers to make the event trusted.
-      ok(window.triggeredTrustedHandler, "trusted events should trigger trusted handler");
+    // Untrusted events should not trigger event handlers without
+    // exposeToUntrustedContent=true.
+    window.triggeredTrustedHandler = false;
+    var untrustedEvent = new CustomEvent('testtrusted');
+    is(untrustedEvent.type, 'testtrusted', "Constructor should see type");
+    bound.dispatchEvent(untrustedEvent);
+    ok(!window.triggeredTrustedHandler, "untrusted events should not trigger trusted handler");
+    var trustedEvent = new CustomEvent('testtrusted');
+    is(trustedEvent.type, 'testtrusted', "Wrapped constructor should see type");
+    SpecialPowers.wrap(bound).dispatchEvent(trustedEvent); // Dispatch over SpecialPowers to make the event trusted.
+    ok(window.triggeredTrustedHandler, "trusted events should trigger trusted handler");
 
-      //
-      // We check key events as well, since they're implemented differently.
-      //
-      // NB: We don't check isTrusted on the events we create here, because
-      // according to smaug, old-style event initialization doesn't mark the
-      // event as trusted until it's dispatched.
-      //
+    //
+    // We check key events as well, since they're implemented differently.
+    //
+    // NB: We don't check isTrusted on the events we create here, because
+    // according to smaug, old-style event initialization doesn't mark the
+    // event as trusted until it's dispatched.
+    //
 
-      window.triggeredUntrustedKeyHandler = false;
-      window.triggeredTrustedKeyHandler = false;
+    window.triggeredUntrustedKeyHandler = false;
+    window.triggeredTrustedKeyHandler = false;
 
-      // Untrusted event, permissive handler.
-      var untrustedKeyEvent = document.createEvent('KeyboardEvent');
-      untrustedKeyEvent.initEvent('keyup', true, true);
-      bound.dispatchEvent(untrustedKeyEvent);
-      ok(window.triggeredUntrustedKeyHandler, "untrusted key events should trigger untrusted handler");
+    // Untrusted event, permissive handler.
+    var untrustedKeyEvent = document.createEvent('KeyboardEvent');
+    untrustedKeyEvent.initEvent('keyup', true, true);
+    bound.dispatchEvent(untrustedKeyEvent);
+    ok(window.triggeredUntrustedKeyHandler, "untrusted key events should trigger untrusted handler");
 
-      // Untrusted event, strict handler.
-      var fakeTrustedKeyEvent = document.createEvent('KeyboardEvent');
-      fakeTrustedKeyEvent.initEvent('keydown', true, true);
-      bound.dispatchEvent(fakeTrustedKeyEvent);
-      ok(!window.triggeredTrustedKeyHandler, "untrusted key events should not trigger trusted handler");
+    // Untrusted event, strict handler.
+    var fakeTrustedKeyEvent = document.createEvent('KeyboardEvent');
+    fakeTrustedKeyEvent.initEvent('keydown', true, true);
+    bound.dispatchEvent(fakeTrustedKeyEvent);
+    ok(!window.triggeredTrustedKeyHandler, "untrusted key events should not trigger trusted handler");
 
-      // Trusted event, strict handler. Dispatch using SpecialPowers to make the event trusted.
-      var trustedKeyEvent = document.createEvent('KeyboardEvent');
-      trustedKeyEvent.initEvent('keydown', true, true);
-      SpecialPowers.wrap(bound).dispatchEvent(trustedKeyEvent);
-      ok(window.triggeredTrustedKeyHandler, "trusted key events should trigger trusted handler");
+    // Trusted event, strict handler. Dispatch using SpecialPowers to make the event trusted.
+    var trustedKeyEvent = document.createEvent('KeyboardEvent');
+    trustedKeyEvent.initEvent('keydown', true, true);
+    SpecialPowers.wrap(bound).dispatchEvent(trustedKeyEvent);
+    ok(window.triggeredTrustedKeyHandler, "trusted key events should trigger trusted handler");
 
     // Hand control back to the XBL scope by dispatching an event on the bound element.
     bound.dispatchEvent(new CustomEvent('testevent'));
   }
 
   function checkThrows(fn) {
     try { fn(); ok(false, "Should have thrown"); }
     catch (e) { ok(!!/denied|insecure/.exec(e), "Should have thrown security exception: " + e); }