diff options
Diffstat (limited to 'o3d')
-rw-r--r-- | o3d/tests/selenium/tests/base-test.html | 10 | ||||
-rw-r--r-- | o3d/tests/selenium/tests/v8-test.html | 10 |
2 files changed, 16 insertions, 4 deletions
diff --git a/o3d/tests/selenium/tests/base-test.html b/o3d/tests/selenium/tests/base-test.html index 1683983..80169ed 100644 --- a/o3d/tests/selenium/tests/base-test.html +++ b/o3d/tests/selenium/tests/base-test.html @@ -54,10 +54,18 @@ This tests base.js. o3djs.require('o3djs.test'); o3djs.require('o3djs.util'); +var isChrome = navigator.userAgent.indexOf('Chrome') != -1; +var isSafari = !isChrome && navigator.userAgent.indexOf('Safari') != -1; +var isFirefox2 = navigator.userAgent.indexOf('Firefox/2.') != -1; +var isFirefox = navigator.userAgent.indexOf('Firefox') != -1; +var isInternetExplorer = navigator.userAgent.indexOf('Internet Explorer' != -1); + g_suite = {}; g_suite.testIsArrayWorksInBrowserForV8Arrays = function() { - g_test.assertTrue(o3djs.base.isArray(g_plugin.eval('[1, 2, 3]'))); + if (!isSafari) { + g_test.assertTrue(o3djs.base.isArray(window.g_plugin.eval('[1, 2, 3]'))); + } }; g_suite.testIsArrayWorksForBrowser = function() { diff --git a/o3d/tests/selenium/tests/v8-test.html b/o3d/tests/selenium/tests/v8-test.html index c331b52..6dd96d1 100644 --- a/o3d/tests/selenium/tests/v8-test.html +++ b/o3d/tests/selenium/tests/v8-test.html @@ -626,7 +626,9 @@ g_suite.testV8CanAccessDOM = function() { g_suite.testV8CanRunUtilityCodeNatively = function() { var result = g_plugin.eval("o3djs.math.addVector([1, 2, 3], [3, 2, 1])"); - g_test.assertArrayEquals([4, 4, 4], result); + if (!isSafari) { + g_test.assertArrayEquals([4, 4, 4], result); + } }; o3djs.provide('myNamespace'); @@ -715,8 +717,10 @@ g_suite.testV8CanAccessObjectsInAProvidedNamespace = function() { g_suite.testV8CanAccessArraysInAProvidedNamespace = function() { myNamespace.anArrayConstant = undefined; - g_test.assertArrayEquals([1, 2, 3], g_plugin.eval( - 'myNamespace.anArrayConstant')); + if (!isSafari) { + g_test.assertArrayEquals([1, 2, 3], g_plugin.eval( + 'myNamespace.anArrayConstant')); + } }; g_suite.testV8CanInvokeFunctionsInAProvidedNamespace = function() { |