diff --git a/test/functional_test/README b/test/functional_test/README index c6f706b4dc..259b6664a4 100644 --- a/test/functional_test/README +++ b/test/functional_test/README @@ -1,7 +1,10 @@ -This test client is a simple functional test for WebRTC enabled Chrome build. +This test client 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. The following is necessary to run the test: -- A WebRTC Chrome binary. +- A WebRTC enabled Chrome binary. (Available in dev or canary channel, 18.0.1008 +or newer.) - A peerconnection_server binary (make peerconnection_server). It can be used in two scenarios: @@ -12,11 +15,9 @@ client. To start the test for scenario (1): 1. Start peerconnection_server. -2. Start the WebRTC Chrome build: $ /chrome ---enable-media-stream --enable-p2papi --user-data-dir= - is where Chrome looks for all its states, use for example -"temp/chrome_webrtc_data". If you don't always start the browser from the same -directory, use an absolute path instead. +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. 4. Open the test page, connect to the server, select the loopback peer, click diff --git a/test/functional_test/webrtc_test.html b/test/functional_test/webrtc_test.html index 58e5a464ec..c50ea3a125 100644 --- a/test/functional_test/webrtc_test.html +++ b/test/functional_test/webrtc_test.html @@ -52,13 +52,6 @@ function setElementValuesFromURL() { }); } -function toggleExtraButtons() { - document.getElementById("createPcBtn").hidden = - !document.getElementById("createPcBtn").hidden; - document.getElementById("test1Btn").hidden = - !document.getElementById("test1Btn").hidden; -} - function trace(txt) { var elem = document.getElementById("debug"); elem.innerHTML += txt + "
"; @@ -130,15 +123,14 @@ function peerExists(id) { } function addPeer(id, pname) { - var peerList = document.getElementById("peers"); - var option = document.createElement("option"); - option.text = pname; - option.value = id; try { - // For IE earlier than version 8 - peerList.add(option, x.options[null]); - } catch (e) { + var peerList = document.getElementById("peers"); + var option = document.createElement("option"); + option.text = pname; + option.value = id; peerList.add(option, null); + } catch (e) { + trace_exception(e, "Error adding peer"); } } @@ -523,21 +515,32 @@ function disconnect() { // Window event handling window.onload = function() { - setElementValuesFromURL(); - getUserMedia(); + if (navigator.webkitGetUserMedia) { + document.getElementById('testApp').hidden = false; + setElementValuesFromURL(); + getUserMedia(); + } else { + document.getElementById('errorText').hidden = false; + } } window.onbeforeunload = disconnect; -

WebRTC

-You must have a WebRTC capable browser in order to make calls using this test -page.
  + +