Loading content/html/content/src/nsHTMLInputElement.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -266,7 +266,7 @@ AsyncClickHandler::Run() } // Check if page is allowed to open the popup if (mPopupControlState != openAllowed) { if (mPopupControlState > openControlled) { nsCOMPtr<nsIPopupWindowManager> pm = do_GetService(NS_POPUPWINDOWMANAGER_CONTRACTID); Loading layout/forms/test/test_bug36619.html +17 −3 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=36619 <input id='a' type='file'> </div> <button id='b' onclick="document.getElementById('a').click();">Show Filepicker</button> <button id='c' onmousedown="document.getElementById('a').click();">Show Filepicker</button> <button id='d' onmouseup="document.getElementById('a').click();">Show Filepicker</button> <pre id="test"> <script type="application/javascript"> Loading @@ -36,7 +38,7 @@ SpecialPowers.pushPrefEnv({'set': [ // Tests that a click on 'b' calls the show method. var b = document.getElementById('b'); b.focus(); // Be sure the element is visible. synthesizeMouse(b, 2, 2, {}); synthesizeMouseAtCenter(b, {}); SimpleTest.executeSoon(function() { ok(MockFilePicker.shown, "File picker show method should have been called"); MockFilePicker.reset(); Loading @@ -45,13 +47,25 @@ SpecialPowers.pushPrefEnv({'set': [ document.getElementById("a").click(); SimpleTest.executeSoon(function() { ok(!MockFilePicker.shown, "File picker show method should not have been called"); MockFilePicker.cleanup(); MockFilePicker.reset(); synthesizeMouseAtCenter(document.getElementById('c'), {}); SimpleTest.executeSoon(function() { ok(!MockFilePicker.shown, "File picker show method should have been called"); MockFilePicker.reset(); synthesizeMouseAtCenter(document.getElementById('d'), {}); SimpleTest.executeSoon(function() { ok(MockFilePicker.shown, "File picker show method should have been called"); MockFilePicker.cleanup(); SimpleTest.finish(); }); }); }); }); }); }); </script> </pre> Loading Loading
content/html/content/src/nsHTMLInputElement.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -266,7 +266,7 @@ AsyncClickHandler::Run() } // Check if page is allowed to open the popup if (mPopupControlState != openAllowed) { if (mPopupControlState > openControlled) { nsCOMPtr<nsIPopupWindowManager> pm = do_GetService(NS_POPUPWINDOWMANAGER_CONTRACTID); Loading
layout/forms/test/test_bug36619.html +17 −3 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=36619 <input id='a' type='file'> </div> <button id='b' onclick="document.getElementById('a').click();">Show Filepicker</button> <button id='c' onmousedown="document.getElementById('a').click();">Show Filepicker</button> <button id='d' onmouseup="document.getElementById('a').click();">Show Filepicker</button> <pre id="test"> <script type="application/javascript"> Loading @@ -36,7 +38,7 @@ SpecialPowers.pushPrefEnv({'set': [ // Tests that a click on 'b' calls the show method. var b = document.getElementById('b'); b.focus(); // Be sure the element is visible. synthesizeMouse(b, 2, 2, {}); synthesizeMouseAtCenter(b, {}); SimpleTest.executeSoon(function() { ok(MockFilePicker.shown, "File picker show method should have been called"); MockFilePicker.reset(); Loading @@ -45,13 +47,25 @@ SpecialPowers.pushPrefEnv({'set': [ document.getElementById("a").click(); SimpleTest.executeSoon(function() { ok(!MockFilePicker.shown, "File picker show method should not have been called"); MockFilePicker.cleanup(); MockFilePicker.reset(); synthesizeMouseAtCenter(document.getElementById('c'), {}); SimpleTest.executeSoon(function() { ok(!MockFilePicker.shown, "File picker show method should have been called"); MockFilePicker.reset(); synthesizeMouseAtCenter(document.getElementById('d'), {}); SimpleTest.executeSoon(function() { ok(MockFilePicker.shown, "File picker show method should have been called"); MockFilePicker.cleanup(); SimpleTest.finish(); }); }); }); }); }); }); </script> </pre> Loading