File tree 2 files changed +22
-0
lines changed
test/e2e/extensions/test-extension
2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import * as vscode from "vscode"
2
2
3
3
export function activate ( context : vscode . ExtensionContext ) {
4
4
vscode . window . showInformationMessage ( "test extension loaded" )
5
+ // Test extension
5
6
context . subscriptions . push (
6
7
vscode . commands . registerCommand ( "codeServerTest.proxyUri" , ( ) => {
7
8
if ( process . env . VSCODE_PROXY_URI ) {
@@ -11,4 +12,20 @@ export function activate(context: vscode.ExtensionContext) {
11
12
}
12
13
} ) ,
13
14
)
15
+
16
+ // asExternalUri extension
17
+ context . subscriptions . push (
18
+ vscode . commands . registerCommand ( "codeServerTest.asExternalUri" , async ( ) => {
19
+ const input = await vscode . window . showInputBox ( {
20
+ prompt : "URL to pass through to asExternalUri" ,
21
+ } )
22
+
23
+ if ( input ) {
24
+ const output = await vscode . env . asExternalUri ( vscode . Uri . parse ( input ) )
25
+ vscode . window . showInformationMessage ( `input: ${ input } output: ${ output } ` )
26
+ } else {
27
+ vscode . window . showErrorMessage ( `Failed to run test case. No input provided.` )
28
+ }
29
+ } ) ,
30
+ )
14
31
}
Original file line number Diff line number Diff line change 17
17
"command" : " codeServerTest.proxyUri" ,
18
18
"title" : " Get proxy URI" ,
19
19
"category" : " code-server"
20
+ },
21
+ {
22
+ "command" : " codeServerTest.asExternalUri" ,
23
+ "title" : " asExternalUri test" ,
24
+ "category" : " code-server"
20
25
}
21
26
]
22
27
},
You can’t perform that action at this time.
0 commit comments