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

Unified Diff: third_party/WebKit/LayoutTests/resources/js-test.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/resources/js-test.js
diff --git a/third_party/WebKit/LayoutTests/resources/js-test.js b/third_party/WebKit/LayoutTests/resources/js-test.js
index 0419bca488ed8250065579d5c4db3b27385c390b..77b85c369afad00928e5247f88baeb045c307412 100644
--- a/third_party/WebKit/LayoutTests/resources/js-test.js
+++ b/third_party/WebKit/LayoutTests/resources/js-test.js
@@ -216,23 +216,6 @@ function stringify(v)
else return "" + v;
}
-// 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));
-}
-
function evalAndLog(_a, _quiet)
{
if (typeof _a != "string")

Powered by Google App Engine
This is Rietveld 408576698