This commit is contained in:
Rob 2015-10-26 21:32:39 -07:00
Родитель e26bb495a7
Коммит 05ba1784d7
3 изменённых файлов: 4 добавлений и 15 удалений

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

@ -42,24 +42,21 @@ suite('WebKitDebugAdapter', () => {
});
suite('attach()', () => {
test('fail', done => done('failed!!!!'));
test('if successful, an initialized event is fired', done => {
test('if successful, an initialized event is fired', () => {
const WebKitDebugAdapter: typeof _WebKitDebugAdapter = require(MODULE_UNDER_TEST).WebKitDebugAdapter;
const wkda = new WebKitDebugAdapter();
let initializedFired = false;
wkda.registerEventHandler((event: DebugProtocol.Event) => {
if (event.type === 'initialize2') {
if (event.event === 'initialized') {
initializedFired = true;
} else {
assert.fail('An unexpected event was fired');
}
});
wkda.attach({ address: 'localhost', 'port': 9222 }).then(() => {
if (initializedFired) {
done();
} else {
return wkda.attach({ address: 'localhost', 'port': 9222 }).then(() => {
if (!initializedFired) {
assert.fail('Attach completed without firing the initialized event');
}
});

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

@ -14,10 +14,6 @@ import * as NodeUrl from 'url';
import * as Path from 'path';
import * as Os from 'os';
class B {
private _a = new A();
}
interface IPendingBreakpoint {
resolve: (response: SetBreakpointsResponseBody) => void;
reject: (error?: any) => void;

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

@ -11,10 +11,6 @@ import {AdapterProxy} from '../adapter/adapterProxy';
import {LineNumberTransformer} from '../adapter/lineNumberTransformer';
import {SourceMapTransformer} from '../adapter/sourceMaps/sourceMapTransformer';
class A {
}
export class WebKitDebugSession extends DebugSession {
private _adapterProxy: AdapterProxy;