Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Cleanup old code that was there to support the Internet Explorer #7251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
drop IE from jasmine tests
  • Loading branch information
archmoj committed Oct 24, 2024
commit f2c6f1425cdaa6a83b08fe19d0a90e014e2ab8de
34 changes: 0 additions & 34 deletions 34 test/jasmine/assets/unpolyfill.js

This file was deleted.

2 changes: 0 additions & 2 deletions 2 test/jasmine/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ if(isFullSuite) {
}

var pathToCustomMatchers = path.join(__dirname, 'assets', 'custom_matchers.js');
var pathToUnpolyfill = path.join(__dirname, 'assets', 'unpolyfill.js');
var pathToSaneTopojsonDist = path.join(__dirname, '..', '..', 'node_modules', 'sane-topojson', 'dist');
var pathToMathJax2 = path.join(__dirname, '..', '..', 'node_modules', 'mathjax-v2');
var pathToMathJax3 = path.join(__dirname, '..', '..', 'node_modules', 'mathjax-v3');
Expand Down Expand Up @@ -189,7 +188,6 @@ func.defaultConfig = {
// N.B. the rest of this field is filled below
files: [
pathToCustomMatchers,
pathToUnpolyfill,
// available to fetch from /base/node_modules/mathjax-v2/
// more info: http://karma-runner.github.io/3.0/config/files.html
{pattern: pathToMathJax2 + '/**', included: false, watched: false, served: true},
Expand Down
48 changes: 0 additions & 48 deletions 48 test/jasmine/tests/download_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,54 +86,6 @@ describe('Plotly.downloadImage', function() {
})
.then(done, done.fail);
}, LONG_TIMEOUT_INTERVAL);

it('should produce the right SVG output in IE', function(done) {
// mock up IE behavior
spyOn(Lib, 'isIE').and.callFake(function() { return true; });
spyOn(slzProto, 'serializeToString').and.callFake(function() {
return serializeToString.apply(this, arguments)
.replace(/(\(#)([^")]*)(\))/gi, '(\"#$2\")');
});
var savedBlob;
window.navigator.msSaveBlob = function(blob) { savedBlob = blob; };

var expectedStart = '<svg class=\'main-svg\' xmlns=\'http://www.w3.org/2000/svg\' xmlns:xlink=\'http://www.w3.org/1999/xlink\'';
var plotClip = /clip-path='url\("#clip[0-9a-f]{6}xyplot"\)/;
var legendClip = /clip-path=\'url\("#legend[0-9a-f]{6}"\)/;

Plotly.newPlot(gd, textchartMock.data, textchartMock.layout)
.then(function(gd) {
savedBlob = undefined;
return Plotly.downloadImage(gd, {
format: 'svg',
height: 300,
width: 300,
filename: 'plotly_download'
});
})
.then(function() {
if(savedBlob === undefined) {
fail('undefined saveBlob');
}

return new Promise(function(resolve, reject) {
var reader = new FileReader();
reader.onloadend = function() {
var res = reader.result;

expect(res.substr(0, expectedStart.length)).toBe(expectedStart);
expect(res.match(plotClip)).not.toBe(null);
expect(res.match(legendClip)).not.toBe(null);

resolve();
};
reader.onerror = function(e) { reject(e); };

reader.readAsText(savedBlob);
});
})
.then(done, done.fail);
}, LONG_TIMEOUT_INTERVAL);
});

function downloadTest(gd, format) {
Expand Down
4 changes: 1 addition & 3 deletions 4 test/jasmine/tests/lib_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1853,9 +1853,7 @@ describe('Test lib.js:', function() {
-Number.MAX_VALUE, -Number.MIN_VALUE
];

if(!Lib.isIE()) {
vals.push(Number.EPSILON, -Number.EPSILON);
}
vals.push(Number.EPSILON, -Number.EPSILON);

vals.forEach(function(v) {
expect(Lib.cleanNumber(v)).toBe(v);
Expand Down
22 changes: 0 additions & 22 deletions 22 test/jasmine/tests/svg_text_utils_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,28 +349,6 @@ describe('svg+text utils', function() {
expect(i).toBe(355);
});

it('decodes arbitrary decimal and hex number entities (IE case)', function() {
// IE does not have String.fromCodePoint
String.fromCodePoint = undefined;
expect(String.fromCodePoint).toBeUndefined();

var i = 0;
for(var n = 33; n < 0x10FFFF; n = Math.round(n * 1.03)) {
var node = mockTextSVGElement(
'&#x' + n.toString(16) +
'; = &#' + n.toString() +
'; = &#x' + n.toString(16).toUpperCase() + ';'
);
var char = stringFromCodePoint(n);
expect(node.text()).toBe(char + ' = ' + char + ' = ' + char, n);
i++;
}
// not really necessary to assert this, but we tested 355 characters,
// weighted toward the low end but continuing all the way to the
// end of the unicode definition
expect(i).toBe(355);
});

it('does not decode entities prematurely', function() {
var testCases = [
'&lt;b>not bold</b&gt;',
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.