File tree Expand file tree Collapse file tree
vscode-tests/no-workspace Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,14 +50,6 @@ export function fileUriToWebviewUri(
5050 return panel . webview . asWebviewUri ( fileUriOnDisk ) . toString ( ) ;
5151}
5252
53- /** Converts a URI string received from a webview into a local filesystem URI for the same resource. */
54- export function webviewUriToFileUri ( webviewUri : string ) : Uri {
55- // Webview URIs used the vscode-resource scheme. The filesystem path of the resource can be obtained from the path component of the webview URI.
56- const path = Uri . parse ( webviewUri ) . path ;
57- // For this path to be interpreted on the filesystem, we need to parse it as a filesystem URI for the current platform.
58- return Uri . file ( path ) ;
59- }
60-
6153/**
6254 * Resolves the specified CodeQL location to a URI into the source archive.
6355 * @param loc CodeQL location to resolve. Must have a non-empty value for `loc.file`.
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ import * as tmp from 'tmp';
66import { window , ViewColumn , Uri } from 'vscode' ;
77import {
88 fileUriToWebviewUri ,
9- webviewUriToFileUri ,
109 tryResolveLocation ,
1110} from '../../interface-utils' ;
1211import { getDefaultResultSetName } from '../../interface-types' ;
@@ -47,15 +46,6 @@ describe('interface-utils', () => {
4746 } ;
4847 }
4948
50- it ( 'should correctly round trip from filesystem to webview and back' , function ( ) {
51- const { fileUriOnDisk, panel } = setupWebview ( '' ) ;
52- const webviewUri = fileUriToWebviewUri ( panel , fileUriOnDisk ) ;
53- const reconstructedFileUri = webviewUriToFileUri ( webviewUri ) ;
54- expect ( reconstructedFileUri . toString ( true ) ) . to . equal (
55- fileUriOnDisk . toString ( true )
56- ) ;
57- } ) ;
58-
5949 it ( 'does not double-encode # in URIs' , function ( ) {
6050 const { fileUriOnDisk, panel } = setupWebview ( '#' ) ;
6151 const webviewUri = fileUriToWebviewUri ( panel , fileUriOnDisk ) ;
You can’t perform that action at this time.
0 commit comments