Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Mullvad Browser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Applications
Mullvad Browser
Commits
ad2cbd92
Commit
ad2cbd92
authored
8 years ago
by
Neil Deakin
Browse files
Options
Downloads
Patches
Plain Diff
Bug 1266952, remove cpow usage from browser_contextmenu_childprocess.js, r=felipe
parent
463cd06d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
browser/base/content/test/general/browser_contextmenu_childprocess.js
+9
-12
9 additions, 12 deletions
.../content/test/general/browser_contextmenu_childprocess.js
with
9 additions
and
12 deletions
browser/base/content/test/general/browser_contextmenu_childprocess.js
+
9
−
12
View file @
ad2cbd92
...
...
@@ -4,26 +4,23 @@
const
gBaseURL
=
"
https://example.com/browser/browser/base/content/test/general/
"
;
add_task
(
function
*
()
{
let
tab
=
gBrowser
.
addTab
();
let
browser
=
gBrowser
.
getBrowserForTab
(
tab
);
let
tab
=
yield
BrowserTestUtils
.
openNewForegroundTab
(
gBrowser
,
gBaseURL
+
"
subtst_contextmenu.html
"
);
gBrowser
.
selectedTab
=
tab
;
yield
promiseTabLoadEvent
(
tab
,
gBaseURL
+
"
subtst_contextmenu.html
"
);
let
popupShownPromise
=
promiseWaitForEvent
(
window
,
"
popupshown
"
,
true
);
let
contextMenu
=
document
.
getElementById
(
"
contentAreaContextMenu
"
);
// Get the point of the element with the page menu (test-pagemenu) and
// synthesize a right mouse click there.
let
eventDetails
=
{
type
:
"
contextmenu
"
,
button
:
2
};
let
rect
=
browser
.
contentWindow
.
document
.
getElementById
(
"
test-pagemenu
"
).
getBoundingClientRect
();
EventUtils
.
synthesizeMouse
(
browser
,
rect
.
x
+
rect
.
width
/
2
,
rect
.
y
+
rect
.
height
/
2
,
eventDetails
,
window
);
let
popupShownPromise
=
BrowserTestUtils
.
waitForEvent
(
contextMenu
,
"
popupshown
"
);
yield
BrowserTestUtils
.
synthesizeMouse
(
"
#test-pagemenu
"
,
5
,
5
,
{
type
:
"
contextmenu
"
,
button
:
2
},
tab
.
linkedBrowser
);
let
event
=
yield
popupShownPromise
;
let
contextMenu
=
document
.
getElementById
(
"
contentAreaContextMenu
"
);
checkMenu
(
contextMenu
);
let
popupHiddenPromise
=
BrowserTestUtils
.
waitForEvent
(
contextMenu
,
"
popuphidden
"
);
contextMenu
.
hidePopup
();
gBrowser
.
removeCurrentTab
();
yield
popupHiddenPromise
;
yield
BrowserTestUtils
.
removeTab
(
tab
);
});
function
checkItems
(
menuitem
,
arr
)
...
...
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
register
or
sign in
to comment