From f1d6e0a65bff4ebbdf429d43d5038376e1ecc922 Mon Sep 17 00:00:00 2001 From: "phoglund@webrtc.org" Date: Mon, 4 Jun 2012 10:06:52 +0000 Subject: [PATCH] Removed the obsolete sanity check and added new test HTML files. BUG= TEST= Review URL: https://webrtc-codereview.appspot.com/630004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2349 4adac7df-926f-26a2-2b94-8c16560cd09d --- test/manual/README | 8 + test/manual/audio-and-video.html | 44 ++ test/manual/iframe-video.html | 18 + test/manual/multiple-audio.html | 52 ++ test/manual/multiple-video.html | 68 ++ test/manual/single-audio.html | 41 ++ test/manual/single-video.html | 42 ++ test/manual/two-video-devices.html | 46 ++ test/sanity_check/README | 25 - test/sanity_check/lighttpd.conf | 5 - test/sanity_check/run_sanity_check | 107 ---- test/sanity_check/www/html/README | 60 -- test/sanity_check/www/html/webrtc_test.html | 650 -------------------- 13 files changed, 319 insertions(+), 847 deletions(-) create mode 100644 test/manual/README create mode 100644 test/manual/audio-and-video.html create mode 100644 test/manual/iframe-video.html create mode 100644 test/manual/multiple-audio.html create mode 100644 test/manual/multiple-video.html create mode 100644 test/manual/single-audio.html create mode 100644 test/manual/single-video.html create mode 100644 test/manual/two-video-devices.html delete mode 100644 test/sanity_check/README delete mode 100644 test/sanity_check/lighttpd.conf delete mode 100755 test/sanity_check/run_sanity_check delete mode 100644 test/sanity_check/www/html/README delete mode 100644 test/sanity_check/www/html/webrtc_test.html diff --git a/test/manual/README b/test/manual/README new file mode 100644 index 0000000000..0fc0b7530b --- /dev/null +++ b/test/manual/README @@ -0,0 +1,8 @@ +================================================================ +WEBRTC MANUAL TESTS +================================================================ + +You will need to serve these files off some kind of web server. Currently, +GetUserMedia does not work when run off a file:// URL. + +Contact person: phoglund@webrtc.org \ No newline at end of file diff --git a/test/manual/audio-and-video.html b/test/manual/audio-and-video.html new file mode 100644 index 0000000000..1e54424d47 --- /dev/null +++ b/test/manual/audio-and-video.html @@ -0,0 +1,44 @@ + + + + + Single Local Preview (Video and Audio) + + + + + + + + + + + +
Local Preview
+ + \ No newline at end of file diff --git a/test/manual/iframe-video.html b/test/manual/iframe-video.html new file mode 100644 index 0000000000..dffdbef302 --- /dev/null +++ b/test/manual/iframe-video.html @@ -0,0 +1,18 @@ + + + + + IFRAME Single Local Preview (Video Only) + + + + + \ No newline at end of file diff --git a/test/manual/multiple-audio.html b/test/manual/multiple-audio.html new file mode 100644 index 0000000000..1575c7d0b0 --- /dev/null +++ b/test/manual/multiple-audio.html @@ -0,0 +1,52 @@ + + + + + Multiple Local Preview (Audio Only) + + + + + + + + + + + + + + + + + + + +
Sound test
+ + \ No newline at end of file diff --git a/test/manual/multiple-video.html b/test/manual/multiple-video.html new file mode 100644 index 0000000000..1ba46c19f8 --- /dev/null +++ b/test/manual/multiple-video.html @@ -0,0 +1,68 @@ + + + + + Multiple Local Preview (Video Only) + + + + + + + + + + + + + + + + + + + + + + + + + +
Local Preview
+ + \ No newline at end of file diff --git a/test/manual/single-audio.html b/test/manual/single-audio.html new file mode 100644 index 0000000000..e003a62ea2 --- /dev/null +++ b/test/manual/single-audio.html @@ -0,0 +1,41 @@ + + + + + Single Local Preview (Audio Only) + + + + + + + + + + +
Sound test
+ + \ No newline at end of file diff --git a/test/manual/single-video.html b/test/manual/single-video.html new file mode 100644 index 0000000000..6b3283c3b2 --- /dev/null +++ b/test/manual/single-video.html @@ -0,0 +1,42 @@ + + + + + Single Local Preview (Video Only) + + + + + + + + + + +
Local Preview
+ + \ No newline at end of file diff --git a/test/manual/two-video-devices.html b/test/manual/two-video-devices.html new file mode 100644 index 0000000000..bdd197c6b4 --- /dev/null +++ b/test/manual/two-video-devices.html @@ -0,0 +1,46 @@ + + + + + Single Local Preview (Video Only) + + + + + + + + + + + +
Local Preview
+ + \ No newline at end of file diff --git a/test/sanity_check/README b/test/sanity_check/README deleted file mode 100644 index 6bdeb540c4..0000000000 --- a/test/sanity_check/README +++ /dev/null @@ -1,25 +0,0 @@ -This test will pop up a browser with two tabs, and will run video from -one tab to the other tab, across the local network interface. - -In order to run this test, you need to have: - -- an installed lighttpd in your $PATH -- a built peerconnection_server -- a sufficiently new google-chrome binary with WebRTC support. - -To build peerconnection_server, refer to peerconnection_server/README. This -script will assume you have a directory structure like so: - -- webrtc/trunk/ -- peerconnection/trunk - -That is, the script assumes it will find a peerconnection_server binary in -../../../../peerconnection/out/Debug/ relative to the sanity check -directory. If this doesn't suit you, feel free to change the script locally. - -You need to run the script from the test/sanity_check directory. The first time -you run it, you will be asked to choose a search engine. Additionally, you will -have to let Chrome access your webcam by accepting the notice at the top. - -This script uses the webrtc_test.html code, which is described by its own -README in the www/html directory. \ No newline at end of file diff --git a/test/sanity_check/lighttpd.conf b/test/sanity_check/lighttpd.conf deleted file mode 100644 index 4dae92d203..0000000000 --- a/test/sanity_check/lighttpd.conf +++ /dev/null @@ -1,5 +0,0 @@ -server.document-root = "./www/html/" -server.port = 3000 -mimetype.assign = ( - ".html" => "text/html" -) diff --git a/test/sanity_check/run_sanity_check b/test/sanity_check/run_sanity_check deleted file mode 100755 index 56c86bdfe8..0000000000 --- a/test/sanity_check/run_sanity_check +++ /dev/null @@ -1,107 +0,0 @@ -#!/bin/bash -# -# Run a test with the WebRTC Chromium build. -# Should work on any machine with a camera. -# -# Pass the argument --xvfb-and-screenshots to run in a xvfb environment and -# capture screenshots from inside the virtual environment. If you don't what -# that is, never mind and run this script without arguments. -# -# Pass the argument --chrome-binary to provide a custom chrome binary. -# -# Method: -# - Start peerconnection_server. -# - Start serving webrtc_test.html off a local web server. -# - Start 2 browser tabs. -# - Tab 1 connects to the server. -# - Tab 2 connects to the server and calls tab 1. -# - Both tabs will capture the webcam you have on the system and start -# sending to each other. -# - -set -e - -if [ ! -x run_sanity_check ]; then - echo "Error: This script must run from its own directory" - exit 1 -fi - -# Tweakable parameters: -URLBASE=localhost:3000 -CALLEE="$URLBASE/webrtc_test.html?name=test1&autoconnect=yes" -CALLER="$URLBASE/webrtc_test.html?name=test2&autocall=test1" -FLAGS="--enable-media-stream" -CHROME_BINARY=google-chrome - -# Parse parameters: -while (( "$#" )); do - if [ "$1" == "--xvfb-and-screenshots" ]; then - RUN_WITH_XVFB_AND_SCREENSHOTS=1 - fi - if [ "$1" == "--chrome-binary" ]; then - shift - CHROME_BINARY=$1 - fi - shift -done - -run_chrome_for_user() { - # Run the binary straight up and proceed with cleanup when the user closes - # the browser. - ${CHROME_BINARY} $CALLEE $CALLER $FLAGS --user-data-dir=temp/user1 -} - -run_chrome_in_xvfb_with_screenshots() { - # Run chrome in a virtual window environment and capture screenshots. - # It will run for 30 seconds and then exit. - Xvfb :17 -screen 0 1024x768x24 & - XVFB=$! - DISPLAY=:17 ${CHROME_BINARY} $CALLEE $CALLER $FLAGS --user-data-dir=temp/user1 & - CHROME=$! - - sleep 2 - - for (( i = 0; i < 6; i++ )) do - FILENAME="IMAGE${i}.png" - DISPLAY=:17 import -window root $FILENAME - sleep 5 - done - kill $CHROME || echo "No Chrome process." - kill $XVFB || echo "No XVFB process." -} - -PROJECT_ROOT=../.. - -if which lighttpd; then - LOCAL_WEB_SERVER_BINARY=$(which lighttpd) -else - echo "Error: You must install lighttpd first (sudo apt-get install lighttpd)" - exit 1 -fi - -SERVER_BINARY=${PROJECT_ROOT}/../../peerconnection/trunk/out/Debug/peerconnection_server -if [ ! -e "$SERVER_BINARY" ]; then - echo "Error: You must build peerconnection_server first." - echo "I expected to find a binary at $SERVER_BINARY but found none." - exit 1 -fi - -# Launch the web server and make it serve the local www/html directory -${LOCAL_WEB_SERVER_BINARY} -D -f lighttpd.conf & -LOCAL_WEB_SERVER=$! - -${SERVER_BINARY} & -SERVER=$! -echo "Started server as $SERVER" - -# Launch a browser with two tabs: -if [ -z "$RUN_WITH_XVFB_AND_SCREENSHOTS" ]; then - run_chrome_for_user -else - run_chrome_in_xvfb_with_screenshots -fi - -echo "Test finished, cleaning up" - -kill $SERVER || echo "No peerconnection_server" -kill $LOCAL_WEB_SERVER || echo "No local web server" diff --git a/test/sanity_check/www/html/README b/test/sanity_check/www/html/README deleted file mode 100644 index 3c5492fefc..0000000000 --- a/test/sanity_check/www/html/README +++ /dev/null @@ -1,60 +0,0 @@ -webrtc_test.html is a simple functional test for a WebRTC enabled browser. It -has only been tested with Chrome, and is most likely only working with Chrome at -the moment. The following instructions are in part Chrome specific. - -If you want a quick, automated test, have a look at the test/sanity_check script -which uses this page to quickly launch a call test on Linux. - -Table of contents: - * PREREQUISITES - * SINGLE FAKE CLIENT IN LOOPBACK MODE - * TWO CLIENTS CALLING EACH OTHER - * TWO AUTOCALLING CLIENTS - -* PREREQUISITES - -The following is necessary to run the test: -- A WebRTC enabled Chrome binary. (Available in dev or canary channel, version - 18.0.1008 or newer.) -- A peerconnection_server binary. See peerconnection/README for more information - on how to do this. - - Note: The web page must normally be on a web server to be able to access the - camera for security reasons. - - See http://blog.chromium.org/2008/12/security-in-depth-local-web-pages.html - for more details on this topic. This can be overridden with the flag - --allow-file-access-from-files, in which case running it over the file:// - URI scheme works. - -* SINGLE FAKE CLIENT IN LOOPBACK MODE - -1. Start peerconnection_server. -2. Start the WebRTC Chrome build: - $ /chrome --enable-media-stream - The --enable-media-stream flag is required for the time being. -3. Open the server test page, ensure loopback is enabled, choose a name (for - example "loopback") and connect to the server. - For version 18.0.1008 to 18.0.1020, use: - http://libjingle.googlecode.com/svn-history/r103/trunk/talk/examples/peerconnection/server/server_test.html - For version 18.0.1021 and later, use: - http://libjingle.googlecode.com/svn/trunk/talk/examples/peerconnection/server/server_test.html -4. Open the test page, connect to the server, select the loopback peer, click - call. - -* TWO CLIENTS CALLING EACH OTHER - -1. Start peerconnection_server. -2. Start the WebRTC Chrome build, see scenario (1). -3. Open the test page, connect to the server. -4. Open a new new tab, open the test page, connect to the server. - OR - On another machine, repeat 2 and 3. -5. Select the other peer, click call. - -* TWO AUTOCALLING CLIENTS - -1. Run the procedure for "two clients calling each other", but give the pages - the following parameters: - webrtc_test.html?name=test1&autoconnect=yes&server=localhost:8888 - webrtc_test.html?name=test2&autocall=test1&server=localhost:8888 diff --git a/test/sanity_check/www/html/webrtc_test.html b/test/sanity_check/www/html/webrtc_test.html deleted file mode 100644 index 09ce8c64c7..0000000000 --- a/test/sanity_check/www/html/webrtc_test.html +++ /dev/null @@ -1,650 +0,0 @@ - - - - - - - -WebRTC Test - - - - - - - -

WebRTC

- - - - - - - -