Skip to content

Commit 0f08688

Browse files
SourceR85Steven-John Lange
andauthored
remove isIE (#8867)
Co-authored-by: Steven-John Lange <s.lange@hz-deutschland.de>
1 parent 281c3e1 commit 0f08688

File tree

10 files changed

+2
-86
lines changed

10 files changed

+2
-86
lines changed

tests/integration/test.attachments.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3101,7 +3101,7 @@ adapters.forEach(function (adapter) {
31013101
});
31023102

31033103

3104-
if (!testUtils.isSafari() && !testUtils.isIE()) {
3104+
if (!testUtils.isSafari()) {
31053105
// skip in safari/ios because of size limit popup
31063106
it('putAttachment and getAttachment with big png data', function (done) {
31073107

tests/integration/test.basics.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,9 +350,6 @@ adapters.forEach(function (adapter) {
350350
});
351351

352352
it('Remove doc twice with specified id', function () {
353-
if (testUtils.isIE()) {
354-
return Promise.resolve();
355-
}
356353
var db = new PouchDB(dbs.name);
357354
return db.put({_id: 'specifiedId', test: 'somestuff'}).then(function () {
358355
return db.get('specifiedId');

tests/integration/test.bulk_docs.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,9 +1005,6 @@ adapters.forEach(function (adapter) {
10051005
});
10061006

10071007
it('4204 respect revs_limit', function () {
1008-
if (testUtils.isIE()) {
1009-
return Promise.resolve();
1010-
}
10111008
var db = new PouchDB(dbs.name);
10121009

10131010
// simulate 5000 normal commits with two conflicts at the very end

tests/integration/test.changes.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -800,9 +800,6 @@ adapters.forEach(function (adapter) {
800800
// Note for the following test that CouchDB's implementation of /_changes
801801
// with `descending=true` ignores any `since` parameter.
802802
it.skip('Descending many changes', function (done) {
803-
if (testUtils.isIE()) {
804-
return done();
805-
}
806803
var db = new PouchDB(dbs.name);
807804
var docs = [];
808805
var num = 100;
@@ -1568,9 +1565,6 @@ adapters.forEach(function (adapter) {
15681565
});
15691566

15701567
it('supports return_docs=false', function (done) {
1571-
if (testUtils.isIE()) {
1572-
return done();
1573-
}
15741568
var db = new PouchDB(dbs.name);
15751569
var docs = [];
15761570
var num = 10;
@@ -1632,9 +1626,6 @@ adapters.forEach(function (adapter) {
16321626
});
16331627

16341628
it('handle individual changes in live replication', function (done) {
1635-
if (testUtils.isIE()) {
1636-
return done();
1637-
}
16381629
var db = new PouchDB(dbs.name);
16391630
var len = 80;
16401631
var called = 0;

tests/integration/test.compaction.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,6 @@ adapters.forEach(function (adapter) {
173173
];
174174

175175
it('Compact more complicated tree', function (done) {
176-
if (testUtils.isIE()) {
177-
return done();
178-
}
179176
var db = new PouchDB(dbs.name);
180177
testUtils.putTree(db, exampleTree, function () {
181178
db.compact(function () {
@@ -187,9 +184,6 @@ adapters.forEach(function (adapter) {
187184
});
188185

189186
it('Compact two times more complicated tree', function (done) {
190-
if (testUtils.isIE()) {
191-
return done();
192-
}
193187
var db = new PouchDB(dbs.name);
194188
testUtils.putTree(db, exampleTree, function () {
195189
db.compact(function () {
@@ -203,9 +197,6 @@ adapters.forEach(function (adapter) {
203197
});
204198

205199
it('Compact database with at least two documents', function (done) {
206-
if (testUtils.isIE()) {
207-
return done();
208-
}
209200
var db = new PouchDB(dbs.name);
210201
testUtils.putTree(db, exampleTree, function () {
211202
testUtils.putTree(db, exampleTree2, function () {

tests/integration/test.issue2674.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ adapterPairs.forEach(function (adapters) {
3232
});
3333

3434
it('Should correctly synchronize attachments (#2674)', function () {
35-
if (testUtils.isIE()) {
36-
return Promise.resolve();
37-
}
3835
// 1. So I ran client app on two browsers (let’s call them A and B).
3936
// 2. Then on client A I created plain document (without any attachments).
4037
// 3. After that I put two attachments one by one by using putAttachment method.

tests/integration/test.replication.js

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,6 @@ adapters.forEach(function (adapters) {
108108
});
109109

110110
it('Test pull replication with many changes', function (done) {
111-
if (testUtils.isIE()) {
112-
return done();
113-
}
114111
var remote = new PouchDB(dbs.remote);
115112

116113
var numDocs = 201;
@@ -160,9 +157,6 @@ adapters.forEach(function (adapters) {
160157
});
161158

162159
it.skip('pull replication with many changes + a conflict (#2543)', function () {
163-
if (testUtils.isIE()) {
164-
return Promise.resolve();
165-
}
166160
var db = new PouchDB(dbs.name);
167161
var remote = new PouchDB(dbs.remote);
168162
// simulate 5000 normal commits with two conflicts at the very end
@@ -234,9 +228,6 @@ adapters.forEach(function (adapters) {
234228

235229

236230
it('Test pull replication with many conflicts', function (done) {
237-
if (testUtils.isIE()) {
238-
return done();
239-
}
240231
var remote = new PouchDB(dbs.remote);
241232

242233
var numRevs = 200; // repro "url too long" error with open_revs
@@ -786,9 +777,6 @@ adapters.forEach(function (adapters) {
786777
});
787778

788779
it('#3136 open revs returned correctly 1', function () {
789-
if (testUtils.isIE()) {
790-
return Promise.resolve();
791-
}
792780
var db = new PouchDB(dbs.name);
793781
var remote = new PouchDB(dbs.remote);
794782

@@ -840,9 +828,6 @@ adapters.forEach(function (adapters) {
840828
});
841829

842830
it('#3136 open revs returned correctly 2', function () {
843-
if (testUtils.isIE()) {
844-
return Promise.resolve();
845-
}
846831
var db = new PouchDB(dbs.name);
847832
var remote = new PouchDB(dbs.remote);
848833

@@ -1669,10 +1654,7 @@ adapters.forEach(function (adapters) {
16691654
});
16701655

16711656
it('Replication with filter that leads to some empty batches (#2689)',
1672-
function (done) {
1673-
if (testUtils.isIE()) {
1674-
return done();
1675-
}
1657+
function (done) {
16761658

16771659
var db = new PouchDB(dbs.name);
16781660
var remote = new PouchDB(dbs.remote);
@@ -2140,9 +2122,6 @@ adapters.forEach(function (adapters) {
21402122
});
21412123

21422124
it('Replicate large number of docs', function (done) {
2143-
if (testUtils.isIE()) {
2144-
return done();
2145-
}
21462125
var db = new PouchDB(dbs.name);
21472126
var remote = new PouchDB(dbs.remote);
21482127
var docs = [];
@@ -2208,9 +2187,6 @@ adapters.forEach(function (adapters) {
22082187
});
22092188

22102189
it('#909 Filtered replication bails at paging limit', function (done) {
2211-
if (testUtils.isIE()) {
2212-
return done();
2213-
}
22142190
var db = new PouchDB(dbs.name);
22152191
var remote = new PouchDB(dbs.remote);
22162192
var docs = [];
@@ -2811,9 +2787,6 @@ adapters.forEach(function (adapters) {
28112787
});
28122788

28132789
it("Report write failures if whole saving fails (#942)", function (done) {
2814-
if (testUtils.isIE()) {
2815-
return done();
2816-
}
28172790
var docs = [{_id: 'a', _rev: '1-a'}, {_id: 'b', _rev: '1-b'}];
28182791
var db = new PouchDB(dbs.name);
28192792
var remote = new PouchDB(dbs.remote);
@@ -3339,9 +3312,6 @@ adapters.forEach(function (adapters) {
33393312
});
33403313

33413314
it('#2268 dont stop replication if single unauth', function (done) {
3342-
if (testUtils.isIE()) {
3343-
return done();
3344-
}
33453315
testUtils.isCouchDB(function (isCouchDB) {
33463316
if (adapters[1] !== 'http' || !isCouchDB) {
33473317
return done();
@@ -3382,9 +3352,6 @@ adapters.forEach(function (adapters) {
33823352
});
33833353

33843354
it('#2268 dont stop replication if many unauth', function (done) {
3385-
if (testUtils.isIE()) {
3386-
return done();
3387-
}
33883355
testUtils.isCouchDB(function (isCouchDB) {
33893356
if (adapters[1] !== 'http' || !isCouchDB) {
33903357
return done();
@@ -4116,9 +4083,6 @@ adapters.forEach(function (adapters) {
41164083
});
41174084

41184085
it('#2426 doc_ids dont prevent replication', function () {
4119-
if (testUtils.isIE()) {
4120-
return Promise.resolve();
4121-
}
41224086
var db = new PouchDB(dbs.name);
41234087
var remote = new PouchDB(dbs.remote);
41244088

@@ -4137,9 +4101,6 @@ adapters.forEach(function (adapters) {
41374101
});
41384102

41394103
it('#6809 doc_ids dont prevent one-shot replication', function () {
4140-
if (testUtils.isIE()) {
4141-
return Promise.resolve();
4142-
}
41434104
var db = new PouchDB(dbs.name);
41444105
var remote = new PouchDB(dbs.remote);
41454106

@@ -4159,9 +4120,6 @@ adapters.forEach(function (adapters) {
41594120

41604121

41614122
it('#6809 doc_ids dont prevent one-shot replication', function () {
4162-
if (testUtils.isIE()) {
4163-
return Promise.resolve();
4164-
}
41654123
var db = new PouchDB(dbs.name);
41664124
var remote = new PouchDB(dbs.remote);
41674125

tests/integration/test.replication_events.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,6 @@ adapters.forEach(function (adapters) {
211211
// as expected, each remote document should be passed to a
212212
// change event exactly once (though a change might contain multiple docs)
213213
it('#4627 Test no duplicate changes in live replication', function (done) {
214-
if (testUtils.isIE()) {
215-
return done();
216-
}
217214
var db = new PouchDB(dbs.name);
218215
var remote = new PouchDB(dbs.remote);
219216
var docId = -1;

tests/integration/test.retry.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -570,9 +570,6 @@ adapters.forEach(function (adapters) {
570570
});
571571

572572
it('#5157 replicate many docs with live+retry', function () {
573-
if (testUtils.isIE()) {
574-
return Promise.resolve();
575-
}
576573
var numDocs = 512; // uneven number
577574
var docs = [];
578575
for (var i = 0; i < numDocs; i++) {

tests/integration/utils.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,6 @@ testUtils.isChrome = function () {
2020
/Google Inc/.test(window.navigator.vendor);
2121
};
2222

23-
testUtils.isIE = function () {
24-
var ua = (typeof navigator !== 'undefined' && navigator.userAgent) ?
25-
navigator.userAgent.toLowerCase() : '';
26-
var isIE = ua.indexOf('msie') !== -1;
27-
var isTrident = ua.indexOf('trident') !== -1;
28-
var isEdge = ua.indexOf('edge') !== -1;
29-
return (isIE || isTrident || isEdge);
30-
};
31-
3223
testUtils.isSafari = function () {
3324
return (typeof process === 'undefined' || process.browser) &&
3425
/Safari/.test(window.navigator.userAgent) &&

0 commit comments

Comments
 (0)