Browse files

Makes sure unit tests complete properly in Opera.

  • Loading branch information...
1 parent 552bf1d commit 4dcf8ea234987a41a943c2b72c1e615efc4f808c @jaubourg committed May 16, 2012
Showing with 16 additions and 14 deletions.
  1. +16 −14 test/unit.js
View
30 test/unit.js
@@ -44,20 +44,22 @@ testJSONP( "error (HTTP Code)", "error", {
}
});
-testJSONP( "error (Syntax Error)", "error", {
- expect: 1,
- url: "data/syntax-error.js",
- cache: true,
- beforeSend: function() {
- this.oldOnError = window.onerror;
- window.onerror = function() {
- ok( true, "Syntax Error Thrown" );
- };
- },
- complete: function() {
- window.onerror = this.oldOnError;
- }
-});
+if ( window.opera && window.opera.version() < 11.60 ) {
+ testJSONP( "error (Syntax Error)", "error", {
+ expect: window.opera ? 0 : 1,
+ url: "data/syntax-error.js",
+ cache: true,
+ beforeSend: function() {
+ this.oldOnError = window.onerror;
+ window.onerror = function() {
+ ok( true, "Syntax Error Thrown" );
+ };
+ },
+ complete: function() {
+ window.onerror = this.oldOnError;
+ }
+ });
+}
testJSONP( "error (callback not called)", "error", {
expect: 1,

0 comments on commit 4dcf8ea

Please sign in to comment.