| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import pyauto_nacl # Must be imported before pyauto | 6 import pyauto_nacl # Must be imported before pyauto |
| 7 import pyauto | 7 import pyauto |
| 8 import nacl_utils | 8 import nacl_utils |
| 9 import random | 9 import random |
| 10 | 10 |
| 11 class NaClTest(pyauto.PyUITest): | 11 class NaClTest(pyauto.PyUITest): |
| 12 """Tests for NaCl.""" | 12 """Tests for NaCl.""" |
| 13 nexes = ['basic_object.html', | 13 nexes = [# TODO(cstefansen): Figure out why multiple nexes in a page flakes |
| 14 # on Linux 32 bit (issue 1851); then uncomment the following line |
| 15 # (and similar line below) |
| 16 # 'basic_object.html', |
| 14 'earth_c.html', | 17 'earth_c.html', |
| 15 'earth_cc.html', | 18 'earth_cc.html', |
| 16 'ppapi_core.html', | 19 'ppapi_core.html', |
| 17 'ppapi_example_audio.html#mute', | 20 'ppapi_example_audio.html#mute', |
| 18 'ppapi_file_system.html', | 21 'ppapi_file_system.html', |
| 19 'ppapi_geturl.html', | 22 'ppapi_geturl.html', |
| 20 'ppapi_progress_events.html', | 23 'ppapi_progress_events.html', |
| 21 # TODO(nfullagar): graphics 2d appears to lock up while waiting | 24 # TODO(nfullagar): graphics 2d appears to lock up while waiting |
| 22 # for the replace contents flush callback. Enable this test when | 25 # for the replace contents flush callback. Enable this test when |
| 23 # we've figured out why this occurs and the problem is fixed. | 26 # we've figured out why this occurs and the problem is fixed. |
| 24 # 'ppapi_ppb_graphics2d.html', | 27 # 'ppapi_ppb_graphics2d.html', |
| 25 'srpc_basic.html', | 28 'srpc_basic.html', |
| 26 'srpc_hw.html', | 29 'srpc_hw.html', |
| 27 # TODO(nfullagar): enable this test when it works on trybots. | 30 # TODO(nfullagar): enable this test when it works on trybots. |
| 28 # 'srpc_hw_fd.html', | 31 # 'srpc_hw_fd.html', |
| 29 'srpc_nrd_xfer.html', | 32 # TODO(cstefansen): Figure out why multiple nexes in a page flakes |
| 33 # on Linux 32 bit (issue 1851); then uncomment the following line. |
| 34 # 'srpc_nrd_xfer.html', |
| 30 'srpc_plugin.html', | 35 'srpc_plugin.html', |
| 31 'srpc_shm.html', | 36 'srpc_shm.html', |
| 32 'srpc_sockaddr.html', | 37 'srpc_sockaddr.html', |
| 33 'srpc_url_as_nacl_desc.html'] | 38 'srpc_url_as_nacl_desc.html'] |
| 34 | 39 |
| 35 def testLoadNexesInMultipleTabs(self): | 40 def testLoadNexesInMultipleTabs(self): |
| 36 """Load nexes in multiple tabs and surf away from all of them.""" | 41 """Load nexes in multiple tabs and surf away from all of them.""" |
| 37 | 42 |
| 38 # Prime each tab by navigating to about:version. | 43 # Prime each tab by navigating to about:version. |
| 39 # TODO(mcgrathr): Reduced from 10 to 5 because 256MB*10 is too | 44 # TODO(mcgrathr): Reduced from 10 to 5 because 256MB*10 is too |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 nacl_utils.WaitForNexeLoad(self) | 90 nacl_utils.WaitForNexeLoad(self) |
| 86 nacl_utils.VerifyAllTestsPassed(self) | 91 nacl_utils.VerifyAllTestsPassed(self) |
| 87 | 92 |
| 88 # Go back one last time and make sure we ended up where we started. | 93 # Go back one last time and make sure we ended up where we started. |
| 89 self.GetBrowserWindow(0).GetTab(0).GoBack() | 94 self.GetBrowserWindow(0).GetTab(0).GoBack() |
| 90 self.assertEqual(original_title, self.GetActiveTabTitle()) | 95 self.assertEqual(original_title, self.GetActiveTabTitle()) |
| 91 | 96 |
| 92 | 97 |
| 93 if __name__ == '__main__': | 98 if __name__ == '__main__': |
| 94 pyauto_nacl.Main() | 99 pyauto_nacl.Main() |
| OLD | NEW |