| Index: third_party/WebKit/LayoutTests/http/tests/misc/performance-entry-serializer.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/misc/performance-entry-serializer.html b/third_party/WebKit/LayoutTests/http/tests/misc/performance-entry-serializer.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9ae14b8f78b9bdb965338f6f6e0d66c87d041fb9
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/misc/performance-entry-serializer.html
|
| @@ -0,0 +1,23 @@
|
| +<!DOCTYPE html>
|
| +<script src="/w3c/resources/testharness.js"></script>
|
| +<script src="/w3c/resources/testharnessreport.js"></script>
|
| +<script>
|
| +
|
| +test(function() {
|
| + window.performance.mark('mark1');
|
| + window.performance.mark('mark2');
|
| + window.performance.measure('measure1', 'mark1', 'mark2');
|
| +
|
| + var entries = window.performance.getEntries();
|
| + for (var i = 0; i < entries.length; i++) {
|
| + var entry = entries[i];
|
| + var serialized = JSON.parse(JSON.stringify(entry));
|
| + for (var attr in entry) {
|
| + if (typeof entry[attr] != 'function') {
|
| + assert_equals(serialized[attr], entry[attr], entry.constructor.name + '.' + attr);
|
| + }
|
| + }
|
| + }
|
| +}, 'PerformanceEntry subclasses should serialize all attributes');
|
| +
|
| +</script>
|
|
|