@@ -27,6 +27,7 @@ goog.require('goog.Promise');
27
27
goog . require ( 'goog.async.run' ) ;
28
28
goog . require ( 'goog.testing.jsunit' ) ;
29
29
goog . require ( 'goog.userAgent' ) ;
30
+ goog . require ( 'goog.userAgent.product' ) ;
30
31
goog . require ( 'webdriver.promise' ) ;
31
32
goog . require ( 'webdriver.test.testutil' ) ;
32
33
@@ -40,6 +41,13 @@ var StubError = webdriver.test.testutil.StubError,
40
41
var flow , uncaughtExceptions ;
41
42
42
43
44
+ function longStackTracesAreBroken ( ) {
45
+ // Safari 8.0 is "Safari/538.35.8" in the user agent.
46
+ return goog . userAgent . product . SAFARI &&
47
+ ! goog . userAgent . isVersionOrHigher ( 538 ) ;
48
+ }
49
+
50
+
43
51
function shouldRunTests ( ) {
44
52
return ! goog . userAgent . IE || goog . userAgent . isVersionOrHigher ( 10 ) ;
45
53
}
@@ -477,6 +485,10 @@ function testFailsParentTaskIfAsyncScheduledTaskFails() {
477
485
478
486
479
487
function testLongStackTraces_alwaysIncludesTaskStacksInFailures ( ) {
488
+ if ( longStackTracesAreBroken ( ) ) {
489
+ return ;
490
+ }
491
+
480
492
webdriver . promise . LONG_STACK_TRACES = false ;
481
493
flow . execute ( function ( ) {
482
494
flow . execute ( function ( ) {
@@ -503,6 +515,10 @@ function testLongStackTraces_alwaysIncludesTaskStacksInFailures() {
503
515
504
516
505
517
function testLongStackTraces_doesNotIncludeCompletedTasks ( ) {
518
+ if ( longStackTracesAreBroken ( ) ) {
519
+ return ;
520
+ }
521
+
506
522
flow . execute ( goog . nullFunction , 'succeeds' ) ;
507
523
flow . execute ( throwStubError , 'kaboom' ) . then ( fail , function ( e ) {
508
524
assertIsStubError ( e ) ;
@@ -520,6 +536,10 @@ function testLongStackTraces_doesNotIncludeCompletedTasks() {
520
536
521
537
522
538
function testLongStackTraces_doesNotIncludePromiseChainWhenDisabled ( ) {
539
+ if ( longStackTracesAreBroken ( ) ) {
540
+ return ;
541
+ }
542
+
523
543
webdriver . promise . LONG_STACK_TRACES = false ;
524
544
flow . execute ( function ( ) {
525
545
flow . execute ( function ( ) {
@@ -548,6 +568,10 @@ function testLongStackTraces_doesNotIncludePromiseChainWhenDisabled() {
548
568
549
569
550
570
function testLongStackTraces_includesPromiseChainWhenEnabled ( ) {
571
+ if ( longStackTracesAreBroken ( ) ) {
572
+ return ;
573
+ }
574
+
551
575
webdriver . promise . LONG_STACK_TRACES = true ;
552
576
flow . execute ( function ( ) {
553
577
flow . execute ( function ( ) {
0 commit comments