mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-23 17:06:16 -04:00
Merge pull request #1493 from ether/feature/fixtests
Fixes for the testrunner
This commit is contained in:
commit
9c4a2ef819
3 changed files with 42 additions and 35 deletions
6
src/static/js/jquery_browser.js
vendored
6
src/static/js/jquery_browser.js
vendored
|
@ -2,6 +2,7 @@
|
||||||
Copied from jQuery 1.8, the last jquery version with browser recognition support
|
Copied from jQuery 1.8, the last jquery version with browser recognition support
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
(function(){
|
||||||
// Use of jQuery.browser is frowned upon.
|
// Use of jQuery.browser is frowned upon.
|
||||||
// More details: http://api.jquery.com/jQuery.browser
|
// More details: http://api.jquery.com/jQuery.browser
|
||||||
// jQuery.uaMatch maintained for back-compat
|
// jQuery.uaMatch maintained for back-compat
|
||||||
|
@ -41,4 +42,9 @@ if ( browser.chrome ) {
|
||||||
browser.windows = /windows/.test(userAgent);
|
browser.windows = /windows/.test(userAgent);
|
||||||
browser.mobile = /mobile/.test(userAgent) || /android/.test(userAgent);
|
browser.mobile = /mobile/.test(userAgent) || /android/.test(userAgent);
|
||||||
|
|
||||||
|
if(typeof exports !== 'undefined'){
|
||||||
exports.browser = browser;
|
exports.browser = browser;
|
||||||
|
} else{
|
||||||
|
$.browser = browser;
|
||||||
|
}
|
||||||
|
})();
|
|
@ -85,8 +85,8 @@ var helper = {};
|
||||||
return !$iframe.contents().find("#editorloadingbox").is(":visible");
|
return !$iframe.contents().find("#editorloadingbox").is(":visible");
|
||||||
}, 50000).done(function(){
|
}, 50000).done(function(){
|
||||||
helper.padChrome$ = getFrameJQuery( $('#iframe-container iframe'));
|
helper.padChrome$ = getFrameJQuery( $('#iframe-container iframe'));
|
||||||
helper.padOuter$ = getFrameJQuery(helper.padChrome$('iframe.[name="ace_outer"]'));
|
helper.padOuter$ = getFrameJQuery(helper.padChrome$('iframe[name="ace_outer"]'));
|
||||||
helper.padInner$ = getFrameJQuery( helper.padOuter$('iframe.[name="ace_inner"]'));
|
helper.padInner$ = getFrameJQuery( helper.padOuter$('iframe[name="ace_inner"]'));
|
||||||
|
|
||||||
//disable all animations, this makes tests faster and easier
|
//disable all animations, this makes tests faster and easier
|
||||||
helper.padChrome$.fx.off = true;
|
helper.padChrome$.fx.off = true;
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
<div id="iframe-container"></div>
|
<div id="iframe-container"></div>
|
||||||
|
|
||||||
<script src="/static/js/jquery.js"></script>
|
<script src="/static/js/jquery.js"></script>
|
||||||
|
<script src="/static/js/jquery_browser.js"></script>
|
||||||
<script src="lib/underscore.js"></script>
|
<script src="lib/underscore.js"></script>
|
||||||
|
|
||||||
<script src="lib/mocha.js"></script>
|
<script src="lib/mocha.js"></script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue