unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: joakim@verona.se
To: emacs-devel@gnu.org
Cc: esbenandreasen@gmail.com
Subject: functional testing of emacs with screencast
Date: Tue, 05 Jul 2011 10:19:23 +0200	[thread overview]
Message-ID: <m3iprhnnqs.fsf@verona.se> (raw)

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



                 reply	other threads:[~2011-07-05  8:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3iprhnnqs.fsf@verona.se \
    --to=joakim@verona.se \
    --cc=emacs-devel@gnu.org \
    --cc=esbenandreasen@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).