Skip to content

Commit bb33687

Browse files
committed
Fix tests
1 parent 7ea8e79 commit bb33687

File tree

3 files changed

+35
-20
lines changed

3 files changed

+35
-20
lines changed

InjectedScript/JavaScriptCallFrame.js

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
setVariableValue: {
1414
value: function(scopeNumber, variableName, resolvedValue) {
1515
return this.proto.setVariableValue(scopeNumber, variableName, resolvedValue);
16-
}
16+
},
17+
configurable: true
1718
},
1819

1920
caller: {
@@ -22,87 +23,101 @@
2223
if (!caller) return;
2324

2425
return new JavaScriptCallFrame(caller);
25-
}
26+
},
27+
configurable: true
2628
},
2729

2830
sourceID: {
2931
get: function() {
3032
return Number(this.proto.sourceID());
31-
}
33+
},
34+
configurable: true
3235
},
3336

3437
line: {
3538
get: function() {
3639
return Number(this.proto.line());
37-
}
40+
},
41+
configurable: true
3842
},
3943

4044
column: {
4145
get: function() {
4246
return Number(this.proto.column());
43-
}
47+
},
48+
configurable: true
4449
},
4550

4651
scriptName: {
4752
get: function() {
4853
return String(this.proto.scriptName());
49-
}
54+
},
55+
configurable: true
5056
},
5157

5258
functionName: {
5359
get: function() {
5460
return String(this.proto.functionName());
55-
}
61+
},
62+
configurable: true
5663
},
5764

5865
functionLine: {
5966
get: function() {
6067
return Number(this.proto.functionLine());
61-
}
68+
},
69+
configurable: true
6270
},
6371

6472
functionColumn: {
6573
get: function() {
6674
return Number(this.proto.functionColumn());
67-
}
75+
},
76+
configurable: true
6877
},
6978

7079
scopeChain: {
7180
get: function() {
7281
var scopeChain = this.proto.scopeChain();
7382
return scopeChain.slice();
74-
}
83+
},
84+
configurable: true
7585
},
7686

7787
scopeType: {
7888
value: function(index) {
7989
var scopeType = this.proto.scopeType();
8090
return Number(scopeType[index]);
81-
}
91+
},
92+
configurable: true
8293
},
8394

8495
thisObject: {
8596
get: function() {
8697
return this.proto.thisObject;
87-
}
98+
},
99+
configurable: true
88100
},
89101

90102
stepInPositions: {
91103
get: function() {
92104
return String(this.proto.stepInPositions());
93-
}
105+
},
106+
configurable: true
94107
},
95108

96109
isAtReturn: {
97110
get: function() {
98111
return Boolean(this.proto.isAtReturn);
99-
}
112+
},
113+
configurable: true
100114
},
101115

102116
returnValue: {
103117
get: function() {
104118
return this.proto.returnValue;
105-
}
119+
},
120+
configurable: true
106121
}
107122
});
108123

test/injected-script-source.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var NODE_NEXT = require('../tools/NODE_NEXT.js');
44

55
if (!NODE_NEXT) return;
66

7-
describe.only('InjectedScriptSource', function() {
7+
describe('InjectedScriptSource', function() {
88
before(function() {
99
debug.enableWebkitProtocol();
1010
});

test/injected-script.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ describe('binding', function() {
2121
checksTypeValid(new RegExp(), 'regexp');
2222
checksTypeValid(new Error(), 'error');
2323
checksTypeValid(new String(), undefined);
24+
checksTypeValid(new Promise(function() {}), undefined);
2425

2526
function checksTypeValid(value, type) {
2627
it('checks ' + type + ' subtype', function() {
@@ -65,17 +66,16 @@ describe('binding', function() {
6566
describe('function `internalConstructorName`', function() {
6667
checksNameValid(new Number(), 'Number');
6768
checksNameValid(new Object(), 'Object');
69+
checksNameValid(new Promise(function() {}), 'Promise');
70+
checksNameValid(1, undefined);
71+
checksNameValid(null, undefined);
6872

6973
function checksNameValid(value, name) {
7074
it('checks new ' + name + '() constructor name', function() {
7175
expect(host.internalConstructorName(value)).to.equal(name);
7276
});
7377
}
7478

75-
throwsOnArgs([]);
76-
throwsOnArgs([1]);
77-
throwsOnArgs([null]);
78-
7979
function throwsOnArgs(argvList) {
8080
it('should throw on wrong arguments ' + JSON.stringify(argvList), function() {
8181
expect(host.internalConstructorName.bind.apply(

0 commit comments

Comments
 (0)