Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(877)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/resources/testharness-helpers.js

Issue 1935703003: Layout Tests: Remove stringifyDOMObject() helper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@test-idlattr
Patch Set: Update expectation for test w/ line # change Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/resources/testharness-helpers.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/resources/testharness-helpers.js b/third_party/WebKit/LayoutTests/http/tests/resources/testharness-helpers.js
index 1d7b8c85b7dca5a4f4532f805731dbc0750ca495..e4885727b321c704dcb434ee9ad7158312735294 100644
--- a/third_party/WebKit/LayoutTests/http/tests/resources/testharness-helpers.js
+++ b/third_party/WebKit/LayoutTests/http/tests/resources/testharness-helpers.js
@@ -31,20 +31,3 @@ function assert_promise_rejects(promise, code, description) {
}
});
}
-
-// 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.
-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));
-}

Powered by Google App Engine
This is Rietveld 408576698