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

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

Issue 2422913002: Add serializers for window.performance. (Closed)
Patch Set: Add serializers for window.performance and window.performance.navigation. 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
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..4aaedd08ddd9a265069b42aedb4f700bcf4e48fe 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,33 @@ 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');
+
+// PerformanceMemory supports a serializer.
+var jsonizedMemory = JSON.parse(JSON.stringify(window.performance.memory));
+logValue('jsonizedMemory');
+
+// Performance supports a serializer.
+var jsonizedPerformance = JSON.parse(JSON.stringify(window.performance));
+logValue('jsonizedPerformance');
+
window.performance = 'performance is replaceable';
logValue('window.performance');
+
flushLog();
</script>

Powered by Google App Engine
This is Rietveld 408576698