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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <p>This test dumps all of the properties that are reachable from the window.perf ormance object, along with their types.</p> 1 <p>This test dumps all of the properties that are reachable from the window.perf ormance object, along with their types.</p>
2 <hr> 2 <hr>
3 <pre id="pre"></pre> 3 <pre id="pre"></pre>
4 4
5 <script> 5 <script>
6 if (window.testRunner) 6 if (window.testRunner)
7 testRunner.dumpAsText(); 7 testRunner.dumpAsText();
8 8
9 var logBuffer = []; 9 var logBuffer = [];
10 function log(s) 10 function log(s)
11 { 11 {
12 logBuffer.push(s); 12 logBuffer.push(s);
13 } 13 }
14 14
15 var pre = document.getElementById('pre'); 15 var pre = document.getElementById('pre');
16 function flushLog() 16 function flushLog()
17 { 17 {
18 var logMessage = logBuffer.join(""); 18 var logMessage = logBuffer.join("");
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 array.sort(); 84 array.sort();
85 for (var i = 0; i < array.length; i++) { 85 for (var i = 0; i < array.length; i++) {
86 var property = array[i]; 86 var property = array[i];
87 logValue(objectName + "." + property); 87 logValue(objectName + "." + property);
88 } 88 }
89 } 89 }
90 90
91 logValue('window.performance'); 91 logValue('window.performance');
92 window.performance.timing = 'timing is not replaceable'; 92 window.performance.timing = 'timing is not replaceable';
93 logValue('window.performance.timing'); 93 logValue('window.performance.timing');
94
94 // PerformanceTiming supports a serializer. 95 // PerformanceTiming supports a serializer.
95 var jsonizedTiming = JSON.parse(JSON.stringify(window.performance.timing)); 96 var jsonizedTiming = JSON.parse(JSON.stringify(window.performance.timing));
96 logValue('jsonizedTiming'); 97 logValue('jsonizedTiming');
98
97 // PerformanceEntry supports a serializer. 99 // PerformanceEntry supports a serializer.
98 window.performance.measure('request'); 100 window.performance.measure('request');
99 var jsonizedEntry = JSON.parse(JSON.stringify(window.performance.getEntriesByNam e('request')[0])); 101 var jsonizedEntry = JSON.parse(JSON.stringify(window.performance.getEntriesByNam e('request')[0]));
100 logValue('jsonizedEntry'); 102 logValue('jsonizedEntry');
103
101 window.performance.navigation = 'navigation is not replaceable'; 104 window.performance.navigation = 'navigation is not replaceable';
102 logValue('window.performance.navigation'); 105 logValue('window.performance.navigation');
106
107 // PerformanceNavigation supports a serializer.
108 var jsonizedNavigation = JSON.parse(JSON.stringify(window.performance.navigation ));
109 logValue('jsonizedNavigation');
110
111 // Performance supports a serializer.
112 var jsonizedPerformance = JSON.parse(JSON.stringify(window.performance));
113 logValue('jsonizedPerformance');
114
103 window.performance = 'performance is replaceable'; 115 window.performance = 'performance is replaceable';
104 logValue('window.performance'); 116 logValue('window.performance');
117
105 flushLog(); 118 flushLog();
106 </script> 119 </script>
OLDNEW
« 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