[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser] 203/311: Bug 1642540 - Catch exception in promiseProxyErrorLoad function in test_prompt_async.html r=sgalich, tgiles a=test-only DONTBUILD
This is an automated email from the git hooks/post-receive script.
pierov pushed a commit to branch geckoview-99.0.1-11.0-1
in repository tor-browser.
commit 9eb66c6d9413996e7fe06f95d8c2cf048975ff30
Author: Dimi <dlee@xxxxxxxxxxx>
AuthorDate: Wed Mar 16 16:15:24 2022 +0000
Bug 1642540 - Catch exception in promiseProxyErrorLoad function in test_prompt_async.html r=sgalich,tgiles a=test-only DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D141226
---
.../passwordmgr/test/mochitest/test_prompt_async.html | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_prompt_async.html b/toolkit/components/passwordmgr/test/mochitest/test_prompt_async.html
index 545d11be49bd2..ad3d6a0c58fde 100644
--- a/toolkit/components/passwordmgr/test/mochitest/test_prompt_async.html
+++ b/toolkit/components/passwordmgr/test/mochitest/test_prompt_async.html
@@ -77,9 +77,18 @@
function promiseProxyErrorLoad(frame) {
return TestUtils.waitForCondition(async function checkForProxyConnectFailure() {
- return SpecialPowers.spawn(frame, [], function() {
- return this.content.document.documentURI.includes("proxyConnectFailure");
- })
+ try {
+ return await SpecialPowers.spawn(frame, [], function() {
+ return this.content.document.documentURI.includes("proxyConnectFailure");
+ })
+ } catch (e) {
+ // The frame may not be ready for the 'spawn' task right after setting
+ // iframe.src, which will throw an exception when that happens.
+ // Since this test is testing error load, we can't wait until the iframe
+ // is 'loaded' either. So we simply catch the exception here and retry the task
+ // later since we are in the waitForCondition loop.
+ return false;
+ }
}, "Waiting for proxyConnectFailure documentURI");
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits