| Index: chrome/test/data/webrtc/peerconnection.js
|
| diff --git a/chrome/test/data/webrtc/peerconnection.js b/chrome/test/data/webrtc/peerconnection.js
|
| index 68ff1ac9f135462202109802fe173dbdc55ae708..00c0306535b757f5f7c578267ea18e382940bd78 100644
|
| --- a/chrome/test/data/webrtc/peerconnection.js
|
| +++ b/chrome/test/data/webrtc/peerconnection.js
|
| @@ -57,7 +57,7 @@ function createLocalOffer(constraints) {
|
| success_('createOffer');
|
| setLocalDescription(peerConnection, localOffer);
|
|
|
| - returnToTest('ok-' + stringifyDOMObject_(localOffer));
|
| + returnToTest('ok-' + JSON.stringify(localOffer));
|
| },
|
| function(error) { failure_('createOffer', error); },
|
| constraints);
|
| @@ -89,7 +89,7 @@ function receiveOfferFromPeer(sessionDescJson, constraints) {
|
| function(answer) {
|
| success_('createAnswer');
|
| setLocalDescription(peerConnection, answer);
|
| - returnToTest('ok-' + stringifyDOMObject_(answer));
|
| + returnToTest('ok-' + JSON.stringify(answer));
|
| },
|
| function(error) { failure_('createAnswer', error); },
|
| constraints);
|
| @@ -178,7 +178,7 @@ function getAllIceCandidates() {
|
| return;
|
| }
|
|
|
| - returnToTest(stringifyDOMObject_(gIceCandidates));
|
| + returnToTest(JSON.stringify(gIceCandidates));
|
| }
|
|
|
| /**
|
| @@ -261,7 +261,7 @@ function success_(method) {
|
|
|
| /** @private */
|
| function failure_(method, error) {
|
| - throw failTest(method + '() failed: ' + stringifyDOMObject_(error));
|
| + throw failTest(method + '() failed: ' + JSON.stringify(error));
|
| }
|
|
|
| /** @private */
|
| @@ -296,28 +296,6 @@ function removeStreamCallback_(event) {
|
| }
|
|
|
| /**
|
| - * Stringifies a DOM object.
|
| - *
|
| - * This function stringifies not only own properties but also DOM attributes
|
| - * which are on a prototype chain. Note that JSON.stringify only stringifies
|
| - * own properties.
|
| - * @private
|
| - */
|
| -function stringifyDOMObject_(object)
|
| -{
|
| - function deepCopy(src) {
|
| - if (typeof src != "object")
|
| - return src;
|
| - var dst = Array.isArray(src) ? [] : {};
|
| - for (var property in src) {
|
| - dst[property] = deepCopy(src[property]);
|
| - }
|
| - return dst;
|
| - }
|
| - return JSON.stringify(deepCopy(object));
|
| -}
|
| -
|
| -/**
|
| * Parses JSON-encoded session descriptions and ICE candidates.
|
| * @private
|
| */
|
|
|