This repository was archived by the owner on Jul 9, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +25
-3
lines changed Expand file tree Collapse file tree 3 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -258,7 +258,7 @@ const DEFAULT_ACTIONS = {
258
258
onPick : restartBrowser ,
259
259
} ,
260
260
viewsource : {
261
- l10nCommands : [ "quickactions-cmd-viewsource " ] ,
261
+ l10nCommands : [ "quickactions-cmd-viewsource2 " ] ,
262
262
icon : "chrome://global/skin/icons/settings.svg" ,
263
263
label : "quickactions-viewsource2" ,
264
264
isVisible : ( ) => currentBrowser ( ) ?. currentURI . scheme !== "view-source" ,
Original file line number Diff line number Diff line change @@ -36,6 +36,28 @@ add_task(async function quickactions_match() {
36
36
Assert . ok ( results [ 0 ] . key == "newaction" , "Matched the new action" ) ;
37
37
} ) ;
38
38
39
+ add_task ( async function quickactions_match_multiple ( ) {
40
+ ActionsProviderQuickActions . addAction ( "multiaction" , {
41
+ commands : [ "testcommand1" , "commandtest2" ] ,
42
+ } ) ;
43
+
44
+ let context = createContext ( "testcommand1" , { } ) ;
45
+ let results = await ActionsProviderQuickActions . queryActions ( context ) ;
46
+ Assert . ok (
47
+ results [ 0 ] . key == "multiaction" ,
48
+ "Matched the action with first keyword"
49
+ ) ;
50
+
51
+ context = createContext ( "commandtest2" , { } ) ;
52
+ results = await ActionsProviderQuickActions . queryActions ( context ) ;
53
+ Assert . ok (
54
+ results [ 0 ] . key == "multiaction" ,
55
+ "Matched the action with first keyword"
56
+ ) ;
57
+
58
+ ActionsProviderQuickActions . removeAction ( "multiaction" ) ;
59
+ } ) ;
60
+
39
61
add_task ( async function duplicate_matches ( ) {
40
62
ActionsProviderQuickActions . addAction ( "testaction" , {
41
63
commands : [ "testaction" , "test" ] ,
Original file line number Diff line number Diff line change @@ -357,8 +357,8 @@ quickactions-update = Update { -brand-short-name }
357
357
quickactions-cmd-update = update
358
358
359
359
# Opens the view-source UI with current pages source
360
- quickactions-viewsource2 = View Page Source
361
- quickactions-cmd-viewsource = view source, source
360
+ quickactions-viewsource2 = View page source
361
+ quickactions-cmd-viewsource2 = view source, source, page source
362
362
363
363
# Tooltip text for the help button shown in the result.
364
364
quickactions-learn-more =
You can’t perform that action at this time.
0 commit comments