[Zope3-checkins] SVN: Zope3/branches/benji-testbrowser-with-real-browsers-take-2/src/zope/testbrowser/real/ - fix two more race conditions

Benji York benji at zope.com
Sun Jul 30 16:19:20 EDT 2006


Log message for revision 69304:
  - fix two more race conditions
  - remove unnecessary kludge with headers
  - whitespace tweak
  

Changed:
  U   Zope3/branches/benji-testbrowser-with-real-browsers-take-2/src/zope/testbrowser/real/__resources__/commands.js
  U   Zope3/branches/benji-testbrowser-with-real-browsers-take-2/src/zope/testbrowser/real/proxy.py
  U   Zope3/branches/benji-testbrowser-with-real-browsers-take-2/src/zope/testbrowser/real/real.py
  U   Zope3/branches/benji-testbrowser-with-real-browsers-take-2/src/zope/testbrowser/real/real.txt

-=-
Modified: Zope3/branches/benji-testbrowser-with-real-browsers-take-2/src/zope/testbrowser/real/__resources__/commands.js
===================================================================
--- Zope3/branches/benji-testbrowser-with-real-browsers-take-2/src/zope/testbrowser/real/__resources__/commands.js	2006-07-30 19:06:57 UTC (rev 69303)
+++ Zope3/branches/benji-testbrowser-with-real-browsers-take-2/src/zope/testbrowser/real/__resources__/commands.js	2006-07-30 20:19:17 UTC (rev 69304)
@@ -24,10 +24,12 @@
 
 function _tb_reload(info) {
     top.frames[0].location = top.frames[0].location.href;
+    return '_tb_WAIT_FOR_PAGE_LOAD';
 }
 
 function _tb_goBack(info) {
     top.frames[0].history.back();
+    return '_tb_WAIT_FOR_PAGE_LOAD';
 }
 
 function _tb_rememberLinkN(info) {

Modified: Zope3/branches/benji-testbrowser-with-real-browsers-take-2/src/zope/testbrowser/real/proxy.py
===================================================================
--- Zope3/branches/benji-testbrowser-with-real-browsers-take-2/src/zope/testbrowser/real/proxy.py	2006-07-30 19:06:57 UTC (rev 69303)
+++ Zope3/branches/benji-testbrowser-with-real-browsers-take-2/src/zope/testbrowser/real/proxy.py	2006-07-30 20:19:17 UTC (rev 69304)
@@ -117,7 +117,7 @@
                 self.command,
                 urlparse.urlunparse(('', '', path, params, query, '')),
                 self.request_version))
-            self.headers['Connection'] = 'close'
+
             for key_val in self.headers.items():
                 request.write("%s: %s\r\n" % key_val)
             request.write("\r\n")

Modified: Zope3/branches/benji-testbrowser-with-real-browsers-take-2/src/zope/testbrowser/real/real.py
===================================================================
--- Zope3/branches/benji-testbrowser-with-real-browsers-take-2/src/zope/testbrowser/real/real.py	2006-07-30 19:06:57 UTC (rev 69303)
+++ Zope3/branches/benji-testbrowser-with-real-browsers-take-2/src/zope/testbrowser/real/real.py	2006-07-30 20:19:17 UTC (rev 69304)
@@ -36,6 +36,7 @@
     text = re.sub(' +', ' ', text)
     return text
 
+
 class Browser(SetattrErrorsMixin):
     """A web user agent."""
     interface.implements(interfaces.IBrowser)

Modified: Zope3/branches/benji-testbrowser-with-real-browsers-take-2/src/zope/testbrowser/real/real.txt
===================================================================
--- Zope3/branches/benji-testbrowser-with-real-browsers-take-2/src/zope/testbrowser/real/real.txt	2006-07-30 19:06:57 UTC (rev 69303)
+++ Zope3/branches/benji-testbrowser-with-real-browsers-take-2/src/zope/testbrowser/real/real.txt	2006-07-30 20:19:17 UTC (rev 69304)
@@ -47,7 +47,7 @@
 goBack doesn't work. XXX
 
     >>> browser.getLink('[top]', index=0).click()
-    >>> browser.goBack() # XXX race condition here?
+    >>> browser.goBack()
     >>> original_contents == browser.contents
     False
 



More information about the Zope3-Checkins mailing list