Bug 1509378 - Make test_input_event.html refer aEvent in checkIfInputIsEvent() rather than window.event r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Mon, 26 Nov 2018 15:46:43 +0000
changeset 507365 1df9d08586c579de56b93e228d826e2ece72896a
parent 507364 a3755a4ba5aa6abd1282278b9483e2ae3b9423c3
child 507366 97091ffa8d252a692f70ed0da845424ff7b67e11
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1509378
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1509378 - Make test_input_event.html refer aEvent in checkIfInputIsEvent() rather than window.event r=smaug This is an idiot mistake. It refers window.event accidentally and it's still disabled on Beta and Release channel. Therefore, we should make it refer aEvent instead. On the other hand, it might be better to make our lint check whether test refers window.event directly or not because it may check odd result accidentally. Differential Revision: https://phabricator.services.mozilla.com/D12870
dom/html/test/forms/test_input_event.html
--- a/dom/html/test/forms/test_input_event.html
+++ b/dom/html/test/forms/test_input_event.html
@@ -52,17 +52,17 @@ https://bugzilla.mozilla.org/show_bug.cg
     }
     is(aEvent.cancelable, false,
        `"input" event should be never cancelable ${aDescription}`);
     is(aEvent.bubbles, true,
        `"input" event should always bubble ${aDescription}`);
   }
 
   function checkIfInputIsEvent(aEvent, aDescription) {
-    ok(event instanceof Event && !(event instanceof UIEvent),
+    ok(aEvent instanceof Event && !(aEvent instanceof UIEvent),
        `"input" event should be dispatched with InputEvent interface ${aDescription}`);
     is(aEvent.cancelable, false,
        `"input" event should be never cancelable ${aDescription}`);
     is(aEvent.bubbles, true,
        `"input" event should always bubble ${aDescription}`);
   }
 
   var textareaInput = 0;