Skip to content

Commit 82fdc86

Browse files
Tests: prepareFakeOperaEnvironment() and clearFakeOperaEnvironment() are not needed anymore, because stacktrace mode does not depend on Opera browser sniffing
1 parent c95aeb3 commit 82fdc86

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

test/TestStacktrace.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,6 @@
4545
//return new Error("Generic error");
4646
return new Error();
4747
},
48-
prepareFakeOperaEnvironment: function() {
49-
if (typeof window !== 'undefined' && !window.opera) {
50-
window.opera = "fake";
51-
window.fakeOpera = true;
52-
}
53-
},
54-
clearFakeOperaEnvironment: function() {
55-
if (typeof window !== 'undefined' && window.fakeOpera) {
56-
delete window.opera;
57-
delete window.fakeOpera;
58-
}
59-
},
6048
createModeStub: function(mode) {
6149
return function() {
6250
ok(false, 'must not call run() for mode "' + mode + '"');
@@ -159,12 +147,10 @@
159147
p.opera9 = function() {
160148
ok(true, 'called run() for "opera9"');
161149
};
162-
UnitTest.fn.prepareFakeOperaEnvironment();
163150
p.run(CapturedExceptions.opera_854);
164151
p.run(CapturedExceptions.opera_902);
165152
p.run(CapturedExceptions.opera_927);
166153
p.run(CapturedExceptions.opera_964);
167-
UnitTest.fn.clearFakeOperaEnvironment();
168154
});
169155

170156
test("run opera10a", function() {
@@ -174,9 +160,7 @@
174160
p.opera10a = function() {
175161
ok(true, 'called run() for "opera10a"');
176162
};
177-
UnitTest.fn.prepareFakeOperaEnvironment();
178163
p.run(CapturedExceptions.opera_1010);
179-
UnitTest.fn.clearFakeOperaEnvironment();
180164
});
181165

182166
test("run opera10b", function() {
@@ -186,9 +170,7 @@
186170
p.opera10b = function() {
187171
ok(true, 'called run() for "opera10b"');
188172
};
189-
UnitTest.fn.prepareFakeOperaEnvironment();
190173
p.run(CapturedExceptions.opera_1063);
191-
UnitTest.fn.clearFakeOperaEnvironment();
192174
});
193175

194176
test("run opera11", function() {
@@ -198,11 +180,9 @@
198180
p.opera11 = function() {
199181
ok(true, 'called run() for "opera11"');
200182
};
201-
UnitTest.fn.prepareFakeOperaEnvironment();
202183
p.run(CapturedExceptions.opera_1111);
203184
p.run(CapturedExceptions.opera_1151);
204185
p.run(CapturedExceptions.opera_1216);
205-
UnitTest.fn.clearFakeOperaEnvironment();
206186
});
207187

208188
test("run other", function() {

0 commit comments

Comments
 (0)