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

Unified Diff: LayoutTests/http/tests/w3c/webperf/resources/worker.js

Issue 821303006: bindings: Fixes layouttests when moving attributes to prototype chains. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed review comments. Created 5 years, 11 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: LayoutTests/http/tests/w3c/webperf/resources/worker.js
diff --git a/LayoutTests/http/tests/w3c/webperf/resources/worker.js b/LayoutTests/http/tests/w3c/webperf/resources/worker.js
index 1e3e58cf692c72c346a590c6e3b58572a8ea6882..610c8eb731c2cc362199e46e84869450d60153cf 100644
--- a/LayoutTests/http/tests/w3c/webperf/resources/worker.js
+++ b/LayoutTests/http/tests/w3c/webperf/resources/worker.js
@@ -24,3 +24,14 @@ self.addEventListener("connect", function(event) {
port.postMessage(results);
};
});
+
+// 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(domObject) {
jsbell 2015/01/22 17:57:29 Hrm, I just noticed LayoutTests/http/tests/w3c/REA
Yuki 2015/01/23 08:06:20 Reverted this file and fixed performance-memory-in
+ var object = {};
+ for (var property in domObject) {
+ object[property] = domObject[property];
+ }
+ return JSON.stringify(object);
+}

Powered by Google App Engine
This is Rietveld 408576698