[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

functional testing of emacs with screencast

From: joakim
Subject: functional testing of emacs with screencast
Date: Tue, 05 Jul 2011 10:19:23 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

When playing around with screencast.el to make a video flaunting the
abilities of the xwidget branch, I realised it can be used for
functional testing of Emacs.

The benefit is that you can do things with timing, so in my case I can
create a buffer, add a webkit widget, split the window, etc, with added
timing. That way I have an easy way to regression test annoying corner
cases like clipping against different Emacs window edges etc.

I include my example screencast.el source file as an example.

Anyway it would be nice if screencast.el could be included in Elpa for
this purpose.

;;(require 'screencast)
(require 'xwidget)
(defconst xwidget-screencast-webkit '("Hello, and welcome to a
  short demo of the Emacs xwidget branch, and the Webkit
  integration it provides." n
  "Xwidgets are toolkit widgets that behave like images in an
  Emacs buffer. Except they are actual widgets, so you can
  interact with them." n
  "There are several, but people seem to fancy the webkit the most so lets have 
a look!"
  (insert "some text")
  (xwidget-insert (point-min)  'webkit-osr "webkit-osr" 500  1000  5)
  "Okay so thats an actual webkit instance in an Emacs buffer! " n
  "Mouse-overs work" n
  "Mouse-clicks work" n
  "You can split the buffer and scroll the windows separately, as
  usual in Emacs. This is however not so usual in the browser
  world for some reason." n
  "So, can you use the xwidget branch as your main Emacs instance?"n
  "Not yet, its still not mature. There are many tricky issues
  left. That being said, there are many simple tasks to help out
  with also if you like!" ))

(defun xwidget-screencast(&optional arg)
  "Displays the screencast for xwidgets."
  (interactive "P")
  (apply (if arg
          xwidget-screencast-webkit "xvidgets" 1 ()))

Joakim Verona

reply via email to

[Prev in Thread] Current Thread [Next in Thread]