unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* functional testing of emacs with screencast
@ 2011-07-05  8:19 joakim
  0 siblings, 0 replies; only message in thread
From: joakim @ 2011-07-05  8:19 UTC (permalink / raw)
  To: emacs-devel; +Cc: esbenandreasen

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)
  n
  "Okay so thats an actual webkit instance in an Emacs buffer! " n
  "Mouse-overs work" n
  "Mouse-clicks work" n
  (split-window-vertically)
  "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
             'screencast-record
           'screencast)
          xwidget-screencast-webkit "xvidgets" 1 ()))

-- 
Joakim Verona



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-07-05  8:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-05  8:19 functional testing of emacs with screencast joakim

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).