Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor Browser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Applications
Tor Browser
Commits
1ab79936
Verified
Commit
1ab79936
authored
8 months ago
by
Emma Zuehlcke
Committed by
Pier Angelo Vendrame
7 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Bug 1866661 - Tests, a=dmeehan
Differential Revision:
https://phabricator.services.mozilla.com/D237737
parent
d8316c5e
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1453
TB 43587: Rebased legacy onto 115.22.0esr
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
browser/components/protocolhandler/test/browser/browser_registerProtocolHandler_notification.js
+21
-0
21 additions, 0 deletions
...t/browser/browser_registerProtocolHandler_notification.js
with
21 additions
and
0 deletions
browser/components/protocolhandler/test/browser/browser_registerProtocolHandler_notification.js
+
21
−
0
View file @
1ab79936
...
...
@@ -6,7 +6,16 @@ const TEST_PATH = getRootDirectory(gTestPath).replace(
"
chrome://mochitests/content
"
,
"
https://example.com
"
);
const
SECURITY_DELAY
=
3000
;
add_task
(
async
function
()
{
// Set a custom, higher security delay for the test to avoid races on slow
// builds.
await
SpecialPowers
.
pushPrefEnv
({
set
:
[[
"
security.notification_enable_delay
"
,
SECURITY_DELAY
]],
});
let
notificationValue
=
"
Protocol Registration: web+testprotocol
"
;
let
testURI
=
TEST_PATH
+
"
browser_registerProtocolHandler_notification.html
"
;
...
...
@@ -58,4 +67,16 @@ add_task(async function () {
let
button
=
buttons
[
0
];
isnot
(
button
.
label
,
null
,
"
We expect the add button to have a label.
"
);
todo
(
button
.
accesskey
,
"
We expect the add button to have a accesskey.
"
);
ok
(
button
.
disabled
,
"
We expect the button to be disabled initially.
"
);
let
timeoutMS
=
SECURITY_DELAY
+
100
;
info
(
`Wait
${
timeoutMS
}
ms for the button to enable.`
);
// eslint-disable-next-line mozilla/no-arbitrary-setTimeout
await
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
SECURITY_DELAY
+
100
));
ok
(
!
button
.
disabled
,
"
We expect the button to be enabled after the security delay.
"
);
});
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment