-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes for minified version test minified version in SauceLabs
- Loading branch information
1 parent
66b0762
commit 8767fc0
Showing
10 changed files
with
108 additions
and
85 deletions.
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,37 @@ | ||
'use strict'; | ||
// this one will be directly run in browser, so disable eslint | ||
/* eslint-disable no-var, no-extend-native, consistent-this, func-style */ | ||
|
||
(function() { | ||
var phantomTest = /PhantomJS/; | ||
if (phantomTest.test(navigator.userAgent)) { | ||
// mocha-phantomjs-core has wrong shim for Function.bind, so we | ||
// will replace it with correct one | ||
// this bind polyfill copied from MDN documentation | ||
Function.prototype.bind = function(oThis) { | ||
if (typeof this !== 'function') { | ||
// closest thing possible to the ECMAScript 5 | ||
// internal IsCallable function | ||
throw new TypeError( | ||
'Function.prototype.bind - what is trying to be bound is not callable' | ||
); | ||
} | ||
|
||
var aArgs = Array.prototype.slice.call(arguments, 1); | ||
var fToBind = this; | ||
var FNOP = function() {}; | ||
var fBound = function() { | ||
return fToBind.apply(this instanceof FNOP ? this : oThis, | ||
aArgs.concat(Array.prototype.slice.call(arguments))); | ||
}; | ||
|
||
if (this.prototype) { | ||
// native functions don't have a prototype | ||
FNOP.prototype = this.prototype; | ||
} | ||
fBound.prototype = new FNOP(); | ||
|
||
return fBound; | ||
}; | ||
} | ||
})(); |
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
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,33 @@ | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<!-- encoding must be set for mocha's special characters to render properly --> | ||
<link rel="stylesheet" href="../node_modules/mocha/mocha.css" /> | ||
<script src="./vendor/lodash.min.js"></script> | ||
</head> | ||
<body> | ||
<div id="deb"></div> | ||
<div id="mocha"></div> | ||
<script src="../node_modules/mocha/mocha.js"></script> | ||
<script src="hacks/phantomhacks.js"></script> | ||
<script src="../build/ripple-latest-min.js"></script> | ||
<script> | ||
if (window.initMochaPhantomJS) { | ||
window.initMochaPhantomJS(); | ||
} | ||
mocha.ui('bdd') | ||
</script> | ||
|
||
<script src="../test-compiled-for-web/api-test.js"></script> | ||
|
||
<script src="../test-compiled-for-web/broadcast-api-test.js"></script> | ||
|
||
<script src="../test-compiled-for-web/connection-test.js"></script> | ||
|
||
<script src="../test-compiled-for-web/rangeset-test.js"></script> | ||
|
||
<script> | ||
mocha.run() | ||
</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