This commit is contained in:
Rob Lourens 2018-03-26 15:20:04 -07:00
Родитель a5611dce27
Коммит dd0c948093
5 изменённых файлов: 11 добавлений и 10 удалений

Просмотреть файл

@ -213,7 +213,7 @@ export class ChromeDebugAdapter extends CoreDebugAdapter {
} else { // If for any reason that changes, we submit the entire product as-is
properties['Versions.Target.Product'] = response.product;
}
return properties
return properties;
});
// Send the versions information as it's own event so we can easily backfill other events in the user session if needed
@ -392,7 +392,7 @@ export class ChromeDebugAdapter extends CoreDebugAdapter {
frameId: args.frameId,
format: args.format,
context: 'repl'
}
};
const evaluateResult = await this.evaluate(evaluateEventArgs);
return {
@ -470,7 +470,7 @@ function findExecutable(program: string): string | undefined {
}
async function findNewlyLaunchedChromeProcess(semaphoreFile: string): Promise<string> {
const regexPattern = /processid\s+=\s+(\d+)\s*;/i
const regexPattern = /processid\s+=\s+(\d+)\s*;/i;
let lastAccessFileContent: string;
for (let i = 0 ; i < 25; i++) {
if (fs.existsSync(semaphoreFile)) {
@ -480,7 +480,7 @@ async function findNewlyLaunchedChromeProcess(semaphoreFile: string): Promise<st
const lines = lastAccessFileContent.split('\n');
const matchedLines = (lines || []).filter(line => line.match(regexPattern))
const matchedLines = (lines || []).filter(line => line.match(regexPattern));
if (matchedLines.length > 1) {
throw new Error(`Unexpected semaphore file format ${lines}`);
}
@ -493,7 +493,7 @@ async function findNewlyLaunchedChromeProcess(semaphoreFile: string): Promise<st
}
await new Promise<void>((resolve) => {
setTimeout(resolve, 200);
})
});
}
const error = new Error(`Cannot acquire Chrome process id`);

Просмотреть файл

@ -81,7 +81,7 @@ suite('ChromeDebugAdapter', () => {
// Hacky mock cleanup
require('child_process').fork = originalFork;
require('fs').statSync = originalStatSync;
})
});
test('launches with minimal correct args', () => {
let spawnCalled = false;
@ -175,5 +175,5 @@ suite('ChromeDebugAdapter', () => {
resolveWebRootPattern(WEBROOT, overrides),
expOverrides);
});
})
});
});

Просмотреть файл

@ -25,7 +25,7 @@ export interface IMockChromeConnectionAPI {
function getBrowserStubs() {
return {
getVersion() { return Promise.resolve({}); }
}
};
}
// See https://github.com/florinn/typemoq/issues/20
@ -81,7 +81,7 @@ function getPageStubs() {
return {
enable() { },
onFrameNavigated() { }
}
};
}
export function getMockChromeConnectionApi(): IMockChromeConnectionAPI {

Просмотреть файл

@ -177,7 +177,7 @@ function runCommonTests(breakOnLoadStrategy: string) {
source: { path: script2Path }
});
await dc.continueRequest();
await dc.assertStoppedLocation('breakpoint', { path: script2Path, line: bpLine, column: bpCol })
await dc.assertStoppedLocation('breakpoint', { path: script2Path, line: bpLine, column: bpCol });
});
});
}

Просмотреть файл

@ -68,6 +68,7 @@
"avoid-escape"
],
"radix": true,
"semicolon": true,
"switch-default": true,
"trailing-comma": [
false,