Skip to content

svenfuchs/rdom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RDom

It’s a stupid name. If you come up with a cool one, please let me know :)

RDom is an experimental headless browser in Ruby. It is similar to Taka…, and based on Nokogiri and Johnson / Therubyracer.

A simple headless browser does not require much more than a DOM implementation and a Javascript engine. Nokogiri provides the DOM (using libxml) while Johnson and Therubyracer both are great Ruby-Javascript bridges that allow to evaluate Javascript in Ruby (and call back to Ruby from Javascript). Johnson wraps Tracemonkey (Mozilla) while Therubyracer wraps V8 (Chrome).

Goals

The first goal is to be able to run the JQuery test suite. This is an in-browser test suite using QUnit. I figure that when RDom can run (and pass) most of this test suite then it should probably work fine for most simple full-stack testing scenarios.

The ultimate goal would be to get a solid (although certainly limited) ruby-based browser going that can run in-process with classical Rails integration tests.

Current State

[June 27, 2010] After I’ve hit a wall with Johnson seqfaults Charles has helped me get started with Therubyracer which wraps V8 in Ruby. Because Charles has had a completely different initial usecase there were a few things to sort out. Currently RDom can run almost all of the unit test suite on V8. One tiny thing will need to be fixed in Therubyracer and there are 3 segfaulting unit tests in test/rdom/jquery_test.rb.

[June 05, 2010] RDom currently can run a good part of the JQuery test suite (core, data, queue, event etc. but not css, ajax, effects etc.) if one runs the QUnit test files individually. Running all QUnit files together results in segfaults somehow related to GC in Johnson collecting Nokogiri DOM nodes.

About

experimental browser implementation in ruby using nokogiri and johnson

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages