mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 06:36:11 +03:00
Merge pull request #2362 from AndrewADev/update-qunit
Update to most recent QUnit
This commit is contained in:
commit
b405a904a6
6711
package-lock.json
generated
6711
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -42,7 +42,7 @@
|
|||||||
"grunt-git-describe": "^2.4.4",
|
"grunt-git-describe": "^2.4.4",
|
||||||
"grunt-istanbul": "^0.8.0",
|
"grunt-istanbul": "^0.8.0",
|
||||||
"grunt-text-replace": "^0.4.0",
|
"grunt-text-replace": "^0.4.0",
|
||||||
"qunitjs": "2.4.1"
|
"qunit": "^2.19.4"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "grunt test",
|
"test": "grunt test",
|
||||||
|
@ -67,10 +67,14 @@
|
|||||||
return document.fullscreenElement;
|
return document.fullscreenElement;
|
||||||
};
|
};
|
||||||
fullScreenApi.requestFullScreen = function( element ) {
|
fullScreenApi.requestFullScreen = function( element ) {
|
||||||
return element.requestFullscreen();
|
return element.requestFullscreen().catch(function (msg) {
|
||||||
|
$.console.error('Fullscreen request failed: ', msg);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
fullScreenApi.exitFullScreen = function() {
|
fullScreenApi.exitFullScreen = function() {
|
||||||
document.exitFullscreen();
|
document.exitFullscreen().catch(function (msg) {
|
||||||
|
$.console.error('Error while exiting fullscreen: ', msg);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
fullScreenApi.fullScreenEventName = "fullscreenchange";
|
fullScreenApi.fullScreenEventName = "fullscreenchange";
|
||||||
fullScreenApi.fullScreenErrorEventName = "fullscreenerror";
|
fullScreenApi.fullScreenErrorEventName = "fullscreenerror";
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>OpenSeadragon QUnit</title>
|
<title>OpenSeadragon QUnit</title>
|
||||||
<link rel="stylesheet" href="/node_modules/qunitjs/qunit/qunit.css">
|
<link rel="stylesheet" href="/node_modules/qunit/qunit/qunit.css">
|
||||||
<link rel="stylesheet" href="/test/lib/jquery-ui-1.10.2/css/smoothness/jquery-ui-1.10.2.min.css">
|
<link rel="stylesheet" href="/test/lib/jquery-ui-1.10.2/css/smoothness/jquery-ui-1.10.2.min.css">
|
||||||
<link rel="stylesheet" href="/test/helpers/test.css">
|
<link rel="stylesheet" href="/test/helpers/test.css">
|
||||||
</head>
|
</head>
|
||||||
@ -15,7 +15,7 @@
|
|||||||
var isCoverageTest = true;
|
var isCoverageTest = true;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="/node_modules/qunitjs/qunit/qunit.js"></script>
|
<script src="/node_modules/qunit/qunit/qunit.js"></script>
|
||||||
<script src="/test/lib/jquery-1.9.1.min.js"></script>
|
<script src="/test/lib/jquery-1.9.1.min.js"></script>
|
||||||
<script src="/test/lib/jquery-ui-1.10.2/js/jquery-ui-1.10.2.min.js"></script>
|
<script src="/test/lib/jquery-ui-1.10.2/js/jquery-ui-1.10.2.min.js"></script>
|
||||||
<script src="/test/lib/jquery.simulate.js"></script>
|
<script src="/test/lib/jquery.simulate.js"></script>
|
||||||
|
@ -224,7 +224,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
QUnit.test('FullScreen', function(assert) {
|
QUnit.test('FullScreen', function(assert) {
|
||||||
var done = assert.async();
|
const done = assert.async();
|
||||||
if (!OpenSeadragon.supportsFullScreen) {
|
if (!OpenSeadragon.supportsFullScreen) {
|
||||||
assert.expect(0);
|
assert.expect(0);
|
||||||
done();
|
done();
|
||||||
@ -234,7 +234,7 @@
|
|||||||
viewer.addHandler("open", function () {
|
viewer.addHandler("open", function () {
|
||||||
assert.ok(!OpenSeadragon.isFullScreen(), 'Started out not fullscreen');
|
assert.ok(!OpenSeadragon.isFullScreen(), 'Started out not fullscreen');
|
||||||
|
|
||||||
var checkEnteringPreFullScreen = function(event) {
|
const checkEnteringPreFullScreen = function(event) {
|
||||||
viewer.removeHandler('pre-full-screen', checkEnteringPreFullScreen);
|
viewer.removeHandler('pre-full-screen', checkEnteringPreFullScreen);
|
||||||
assert.ok(event.fullScreen, 'Switching to fullscreen');
|
assert.ok(event.fullScreen, 'Switching to fullscreen');
|
||||||
assert.ok(!OpenSeadragon.isFullScreen(), 'Not yet fullscreen');
|
assert.ok(!OpenSeadragon.isFullScreen(), 'Not yet fullscreen');
|
||||||
@ -242,7 +242,7 @@
|
|||||||
|
|
||||||
// The fullscreen mode is always denied during tests so we are
|
// The fullscreen mode is always denied during tests so we are
|
||||||
// exiting directly.
|
// exiting directly.
|
||||||
var checkExitingFullScreen = function(event) {
|
const checkExitingFullScreen = function(event) {
|
||||||
viewer.removeHandler('full-screen', checkExitingFullScreen);
|
viewer.removeHandler('full-screen', checkExitingFullScreen);
|
||||||
assert.ok(!event.fullScreen, 'Exiting fullscreen');
|
assert.ok(!event.fullScreen, 'Exiting fullscreen');
|
||||||
assert.ok(!OpenSeadragon.isFullScreen(), 'Disabled fullscreen');
|
assert.ok(!OpenSeadragon.isFullScreen(), 'Disabled fullscreen');
|
||||||
|
@ -3,14 +3,14 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>OpenSeadragon QUnit</title>
|
<title>OpenSeadragon QUnit</title>
|
||||||
<link rel="stylesheet" href="/node_modules/qunitjs/qunit/qunit.css">
|
<link rel="stylesheet" href="/node_modules/qunit/qunit/qunit.css">
|
||||||
<link rel="stylesheet" href="/test/lib/jquery-ui-1.10.2/css/smoothness/jquery-ui-1.10.2.min.css">
|
<link rel="stylesheet" href="/test/lib/jquery-ui-1.10.2/css/smoothness/jquery-ui-1.10.2.min.css">
|
||||||
<link rel="stylesheet" href="/test/helpers/test.css">
|
<link rel="stylesheet" href="/test/helpers/test.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="qunit"></div>
|
<div id="qunit"></div>
|
||||||
<div id="qunit-fixture"></div>
|
<div id="qunit-fixture"></div>
|
||||||
<script src="/node_modules/qunitjs/qunit/qunit.js"></script>
|
<script src="/node_modules/qunit/qunit/qunit.js"></script>
|
||||||
<script src="/test/lib/jquery-1.9.1.min.js"></script>
|
<script src="/test/lib/jquery-1.9.1.min.js"></script>
|
||||||
<script src="/test/lib/jquery-ui-1.10.2/js/jquery-ui-1.10.2.min.js"></script>
|
<script src="/test/lib/jquery-ui-1.10.2/js/jquery-ui-1.10.2.min.js"></script>
|
||||||
<script src="/test/lib/jquery.simulate.js"></script>
|
<script src="/test/lib/jquery.simulate.js"></script>
|
||||||
|
Loading…
Reference in New Issue
Block a user