[Checkins] SVN: zc.testbrowser/branches/sweh-mozlab0.1.9/src/zc/testbrowser/real.py - added a small sleep in wait() because it strangely enough fails the assertion

Christian Zagrodnick cz at gocept.com
Thu Jul 3 11:47:43 EDT 2008


Log message for revision 87964:
  - added a small sleep in wait() because it strangely enough fails the assertion
    otherwise (on Mac OS X)
  
  - wording
  
  

Changed:
  U   zc.testbrowser/branches/sweh-mozlab0.1.9/src/zc/testbrowser/real.py

-=-
Modified: zc.testbrowser/branches/sweh-mozlab0.1.9/src/zc/testbrowser/real.py
===================================================================
--- zc.testbrowser/branches/sweh-mozlab0.1.9/src/zc/testbrowser/real.py	2008-07-03 13:13:17 UTC (rev 87963)
+++ zc.testbrowser/branches/sweh-mozlab0.1.9/src/zc/testbrowser/real.py	2008-07-03 15:47:42 UTC (rev 87964)
@@ -167,14 +167,14 @@
 
     @property
     def url(self):
-        # url is return like (without the line breaks):
+        url = self.execute('content.location')
+        # url is something like this (without the line breaks):
         # 'http://localhost:26118/index.html \xe2\x80\x94 {
         #       href: "http://localhost:26118/index.html",
         #       host: "localhost:26118",
         #       hostname: "localhost",
         #       port: "26118"}'
-        # but we only need the URL part
-        url = self.execute('content.location')
+        # But we only need the URL part
         token = ' \xe2\x80\x94 {'
         if token in url:
             url = url.split(token)[0]
@@ -188,6 +188,7 @@
                 raise RuntimeError('timed out waiting for page load')
 
         assert self.execute('tb_page_loaded;') == 'true'
+        time.sleep(0.005)
         self.execute('tb_page_loaded = false;')
         assert self.execute('tb_page_loaded;') == 'false'
 



More information about the Checkins mailing list