From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: joakim@verona.se Newsgroups: gmane.emacs.devel Subject: functional testing of emacs with screencast Date: Tue, 05 Jul 2011 10:19:23 +0200 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1309854131 22609 80.91.229.12 (5 Jul 2011 08:22:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 5 Jul 2011 08:22:11 +0000 (UTC) Cc: esbenandreasen@gmail.com To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 05 10:22:06 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qe0tS-0001xV-Gf for ged-emacs-devel@m.gmane.org; Tue, 05 Jul 2011 10:22:06 +0200 Original-Received: from localhost ([::1]:33749 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qe0tR-0006md-2h for ged-emacs-devel@m.gmane.org; Tue, 05 Jul 2011 04:22:05 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:48961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qe0qv-0006I2-Cv for emacs-devel@gnu.org; Tue, 05 Jul 2011 04:19:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qe0qt-00048v-SS for emacs-devel@gnu.org; Tue, 05 Jul 2011 04:19:29 -0400 Original-Received: from batman.blixtvik.net ([87.96.254.3]:46755) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qe0qs-00048H-Nv for emacs-devel@gnu.org; Tue, 05 Jul 2011 04:19:26 -0400 Original-Received: from chopper (139-210-96-87.cust.blixtvik.se [87.96.210.139]) by batman.blixtvik.net (Postfix) with ESMTP id 3D8937F8492; Tue, 5 Jul 2011 10:19:24 +0200 (CEST) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 87.96.254.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:141576 Archived-At: 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