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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/Window/window-properties-performance.html

Issue 2422913002: Add serializers for window.performance. (Closed)
Patch Set: remove performance.memory serialization. Created 4 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/Window/window-properties-performance-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/dom/Window/window-properties-performance.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Window/window-properties-performance.html b/third_party/WebKit/LayoutTests/fast/dom/Window/window-properties-performance.html
index 9662090241e54273cdb52c89b9640a0c7037fa35..44a5fd4ebfc9575e03641e9bba692f19aa46aaf4 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/Window/window-properties-performance.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/Window/window-properties-performance.html
@@ -5,7 +5,7 @@
<script>
if (window.testRunner)
testRunner.dumpAsText();
-
+
var logBuffer = [];
function log(s)
{
@@ -91,16 +91,29 @@ function logProperties(object, objectName)
logValue('window.performance');
window.performance.timing = 'timing is not replaceable';
logValue('window.performance.timing');
+
// PerformanceTiming supports a serializer.
var jsonizedTiming = JSON.parse(JSON.stringify(window.performance.timing));
logValue('jsonizedTiming');
+
// PerformanceEntry supports a serializer.
window.performance.measure('request');
var jsonizedEntry = JSON.parse(JSON.stringify(window.performance.getEntriesByName('request')[0]));
logValue('jsonizedEntry');
+
window.performance.navigation = 'navigation is not replaceable';
logValue('window.performance.navigation');
+
+// PerformanceNavigation supports a serializer.
+var jsonizedNavigation = JSON.parse(JSON.stringify(window.performance.navigation));
+logValue('jsonizedNavigation');
+
+// Performance supports a serializer.
+var jsonizedPerformance = JSON.parse(JSON.stringify(window.performance));
+logValue('jsonizedPerformance');
+
window.performance = 'performance is replaceable';
logValue('window.performance');
+
flushLog();
</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/Window/window-properties-performance-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698