Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Missing some zen
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jim Fulton  
View profile  
 More options Feb 16 2011, 3:52 pm
From: Jim Fulton <j...@zope.com>
Date: Wed, 16 Feb 2011 15:52:57 -0500
Local: Wed, Feb 16 2011 3:52 pm
Subject: Missing some zen
A goal: test JavaScript UI code within a Python interpreter.

Use case:

- Create a browser-like environment and load an application (html+js).
- Generate events.
- Make various assertions about the shape of DOM and XHR calls.

(I've been using envjs for it's html parser and json implementation
 for a few weeks now in another project.  In that project, I used
 envjs 1.2 with python-spidermonkey and in the titanium environment.)

I'm using python-spidermonkey.

If I execute spidermonkey.py and then load spidermonkey.js, my
process exits.  If I try:

  bin/envjs spyd t.js

where t.js is:

  window.location = 'http://www.zope.com/';

Again, the process exits.

(I have to create an empty local_settings.js file to avoid an error,
 but that's a minor issue afaict.)

Am I doing something wrong?

From the event loop discussion, I sort of expected that after
setting the window location, something would wait for events.

Looking at the code, it seems that envjs exists when there
aren't more events.

What I suspect I want is to emit an event, run the event loop
until it stops, make assertions about what happened, rinse, and
repeat.

Thoughts?

I'll keep hacking. I suspect I just want to make exit a noop, but I
also suspect I'm missing some basic zen.

Jim

--
Jim Fulton
http://www.linkedin.com/in/jimfulton


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
chris thatcher  
View profile  
 More options Feb 16 2011, 10:17 pm
From: chris thatcher <thatcher.christop...@gmail.com>
Date: Wed, 16 Feb 2011 22:17:46 -0500
Local: Wed, Feb 16 2011 10:17 pm
Subject: Re: [env-js] Missing some zen

I'm tracking this down right now, should have a patch tomorrow.  I created a
ticket :

https://github.com/envjs/env-js/issues/5

Sorry it's still a little rough around the edges, I was running the unit
tests successfully prerelease but even those arent running.  Probably
simple, I just need to track it down.

Thatcher

--
Christopher Thatcher

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
chris thatcher  
View profile  
 More options Feb 17 2011, 4:23 pm
From: chris thatcher <thatcher.christop...@gmail.com>
Date: Thu, 17 Feb 2011 16:23:25 -0500
Local: Thurs, Feb 17 2011 4:23 pm
Subject: Re: [env-js] Missing some zen

Got a patch in just a couple minutes ago, primarily a port 80 issue (
similar to patch i had made for node recently), but also found some issues
in the html5 parser (unrelated to your issue since you never got that far ;)
).  I also added a script to examples called loadpage.js which just loads
zope.com and spits out the title and how long it to until DOMContentLoaded.

env-js thatcher$ bin/envjs spyd examples/loadpage.js
Zope Corporation | Home  (loaded in  1073 )

Thanks for letting me know it was broken, a big rework of the unit tests is
coming down the pipe and should help keep things nice and stable.

Thatcher

On Wed, Feb 16, 2011 at 10:17 PM, chris thatcher <

--
Christopher Thatcher

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »