diff options
author | kkania@google.com <kkania@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-12 21:57:36 +0000 |
---|---|---|
committer | kkania@google.com <kkania@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-12 21:57:36 +0000 |
commit | e110b914ed2d8fdd7d4770215c4315a716a2a8c9 (patch) | |
tree | ccd05a1690187e42539a6c102cbd0ddee1fca28b /o3d | |
parent | 141a87c51d6a835669853d3b43c51c2f326a18e0 (diff) | |
download | chromium_src-e110b914ed2d8fdd7d4770215c4315a716a2a8c9.zip chromium_src-e110b914ed2d8fdd7d4770215c4315a716a2a8c9.tar.gz chromium_src-e110b914ed2d8fdd7d4770215c4315a716a2a8c9.tar.bz2 |
Changes assertMatrix to call get_eval per matrix instead of per every value in the matrix, in order to fix RotateModel test on ie6.
Review URL: http://codereview.chromium.org/271062
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28746 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r-- | o3d/tests/selenium/sample_list.txt | 2 | ||||
-rw-r--r-- | o3d/tests/selenium/samples_tests.py | 16 |
2 files changed, 10 insertions, 8 deletions
diff --git a/o3d/tests/selenium/sample_list.txt b/o3d/tests/selenium/sample_list.txt index 90c3c62..ea7b05e 100644 --- a/o3d/tests/selenium/sample_list.txt +++ b/o3d/tests/selenium/sample_list.txt @@ -130,7 +130,7 @@ small TestSampleRefreshPageLoad_Small medium TestSampleCustomCamera pdiff_threshold(200) pdiff_threshold_win(200) screenshot medium TestSamplePicking medium TestSampleRenderMode -medium TestSampleRotateModel pdiff_threshold(200) screenshot +medium TestSampleRotateModel pdiff_threshold(200) screenshots(2) medium TestSampleShader_Test pdiff_threshold(200) pdiff_threshold_win(200) screenshots(13) large TestSampleMultipleClientsLarge large TestSamplePingPongLarge diff --git a/o3d/tests/selenium/samples_tests.py b/o3d/tests/selenium/samples_tests.py index 06c52fb..70ccad5 100644 --- a/o3d/tests/selenium/samples_tests.py +++ b/o3d/tests/selenium/samples_tests.py @@ -88,13 +88,15 @@ class SampleTests(selenium_utilities.SeleniumTestCase): """ # Alias for the selenium session s = self.session - for i in range(0, 4): - for j in range(0, 4): - string1 = "%s[%d][%d]" % (matrix1, i, j) - string2 = "%s[%d][%d]" % (matrix2, i, j) - a = float(s.get_eval(string1)) - b = float(s.get_eval(string2)) - self.assertTrue(abs(a - b) < 0.001) + mat1_values = s.get_eval(matrix1 + '.toString()').split(',') + mat2_values = s.get_eval(matrix2 + '.toString()').split(',') + + self.assertTrue(len(mat1_values) == 16) + self.assertTrue(len(mat2_values) == 16) + for i in range(len(mat1_values)): + a = float(mat1_values[i]) + b = float(mat2_values[i]) + self.assertTrue(abs(a - b) < 0.001) def TestSampleRotateModel(self): """Tests rotatemodel.html.""" |