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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/misc/performance-entry-serializer.html

Issue 1780523005: Fix JSON serialization of PerformanceEntry subclasses (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/Source/core/timing/PerformanceCompositeTiming.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="/w3c/resources/testharness.js"></script>
3 <script src="/w3c/resources/testharnessreport.js"></script>
4 <script>
5
6 test(function() {
7 window.performance.mark('mark1');
8 window.performance.mark('mark2');
9 window.performance.measure('measure1', 'mark1', 'mark2');
10
11 var entries = window.performance.getEntries();
12 for (var i = 0; i < entries.length; i++) {
13 var entry = entries[i];
14 var serialized = JSON.parse(JSON.stringify(entry));
15 for (var attr in entry) {
16 if (typeof entry[attr] != 'function') {
17 assert_equals(serialized[attr], entry[attr], entry.constructor.n ame + '.' + attr);
18 }
19 }
20 }
21 }, 'PerformanceEntry subclasses should serialize all attributes');
22
23 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/timing/PerformanceCompositeTiming.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698