forked from CesiumGS/cesium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The selection of the implementation should only happen once. Add smarts to the non-native setTimeout fallback to make it better target 60fps by accounting for the time taken by the callback. Add es5-shim library when running specs to allow them to actually be runnable on old IE. Update LICENSE.md to reflect current state of third party libraries by removing old ACE and JS Beautifier entries, and add CodeMirror, JSHint, and now es5-shim.
- Loading branch information
Showing
7 changed files
with
1,271 additions
and
207 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/*global defineSuite*/ | ||
defineSuite([ | ||
'Core/requestAnimationFrame' | ||
], function( | ||
requestAnimationFrame) { | ||
"use strict"; | ||
/*global jasmine,describe,xdescribe,it,xit,expect,beforeEach,afterEach,beforeAll,afterAll,spyOn,runs,waits,waitsFor*/ | ||
|
||
it('calls the callback', function() { | ||
var callbackRan = false; | ||
|
||
runs(function() { | ||
requestAnimationFrame(function() { | ||
callbackRan = true; | ||
}); | ||
}); | ||
|
||
waitsFor(function() { | ||
return callbackRan; | ||
}); | ||
}); | ||
|
||
it('provides a timestamp that increases each frame', function() { | ||
var callbackTimestamps = []; | ||
|
||
runs(function() { | ||
function callback(timestamp) { | ||
callbackTimestamps.push(timestamp); | ||
|
||
if (callbackTimestamps.length < 3) { | ||
requestAnimationFrame(callback); | ||
} | ||
} | ||
requestAnimationFrame(callback); | ||
}); | ||
|
||
waitsFor(function() { | ||
return callbackTimestamps.length === 3; | ||
}); | ||
|
||
runs(function() { | ||
expect(callbackTimestamps[0]).toBeLessThanOrEqualTo(callbackTimestamps[1]); | ||
expect(callbackTimestamps[1]).toBeLessThanOrEqualTo(callbackTimestamps[2]); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Jasmine Test Runner</title> | ||
<meta charset="utf-8"> | ||
<title>Jasmine Test Runner</title> | ||
|
||
<!-- Use Chrome Frame in IE --> | ||
<meta http-equiv="X-UA-Compatible" content="chrome=1"> | ||
<!-- Use Chrome Frame in IE --> | ||
<meta http-equiv="X-UA-Compatible" content="chrome=1"> | ||
|
||
<link rel="shortcut icon" type="image/png" href="../ThirdParty/jasmine-1.1.0/jasmine_favicon.png"> | ||
<link rel="stylesheet" type="text/css" href="../ThirdParty/jasmine-1.1.0/jasmine.css"> | ||
<script type="text/javascript" src="../ThirdParty/jasmine-1.1.0/jasmine.js"></script> | ||
<script type="text/javascript" src="../ThirdParty/jasmine-1.1.0/jasmine-html.js"></script> | ||
<script type="text/javascript" src="../ThirdParty/requirejs-1.0.8/require.js"></script> | ||
<script type="text/javascript" src="SpecList.js"></script> | ||
<link rel="shortcut icon" type="image/png" href="../ThirdParty/jasmine-1.1.0/jasmine_favicon.png"> | ||
<link rel="stylesheet" type="text/css" href="../ThirdParty/jasmine-1.1.0/jasmine.css"> | ||
<script type="text/javascript" src="../ThirdParty/jasmine-1.1.0/jasmine.js"></script> | ||
<script type="text/javascript" src="../ThirdParty/jasmine-1.1.0/jasmine-html.js"></script> | ||
<script type="text/javascript" src="../ThirdParty/es5-shim/es5-shim.js"></script> | ||
|
||
<script type="text/javascript" src="../ThirdParty/requirejs-1.0.8/require.js"></script> | ||
<script type="text/javascript" src="SpecList.js"></script> | ||
</head> | ||
<body> | ||
<script type="text/javascript" src="SpecRunner.js"></script> | ||
<script type="text/javascript" src="SpecRunner.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
Copyright 2009, 2010 Kristopher Michael Kowal. All rights reserved. | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to | ||
deal in the Software without restriction, including without limitation the | ||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | ||
sell copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
IN THE SOFTWARE. |
Oops, something went wrong.