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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/performance-timing/paint-timing/observable.html

Issue 2899023003: buffer paint entries so they can queried with getEntries (Closed)
Patch Set: update test Created 3 years, 7 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/Source/core/timing/PerformanceBase.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/performance-timing/paint-timing/observable.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/performance-timing/paint-timing/observable.html b/third_party/WebKit/LayoutTests/http/tests/performance-timing/paint-timing/observable.html
index e73b9e6e7e717a4dee0baa41fd4e0744280d91b3..ad7272486be65ee9caa7afaaca137a7adc126335 100644
--- a/third_party/WebKit/LayoutTests/http/tests/performance-timing/paint-timing/observable.html
+++ b/third_party/WebKit/LayoutTests/http/tests/performance-timing/paint-timing/observable.html
@@ -15,14 +15,32 @@
"There should be two paint timing instances.");
assert_equals(entries[0].entryType, "paint",
"Expected entryType to be: paint.");
+ assert_equals(entries[0].name, "first-paint",
+ "Expected entryType to be: paint.");
assert_equals(entries[0].duration, 0,
"Expected duration to be: 0.");
assert_equals(entries[1].entryType, "paint",
"Expected entryType to be: paint.");
+ assert_equals(entries[1].name, "first-contentful-paint",
+ "Expected entryType to be: paint.");
assert_equals(entries[1].duration, 0,
"Expected duration to be: 0.");
observer.disconnect();
+
+ // Check buffer
tdresser 2017/05/23 17:33:57 I think we try for tailing "."'s in JS too, don't
panicker 2017/05/23 17:44:11 Is this in the style guide somewhere?
tdresser 2017/05/23 18:11:14 JS style guide says follow C++ guide for comments
panicker 2017/05/23 22:57:17 not sure "proper punctuation" entails a period for
+ bufferedEntries = performance.getEntriesByType('paint');
+ assert_equals(bufferedEntries.length, 2,
+ "There should be two paint timing instances.");
+ assert_equals(bufferedEntries[0].entryType, "paint",
+ "Expected entryType to be: paint.");
+ assert_equals(bufferedEntries[0].name, "first-paint",
+ "Expected entryType to be: paint.");
+ assert_equals(bufferedEntries[1].entryType, "paint",
+ "Expected entryType to be: paint.");
+ assert_equals(bufferedEntries[1].name, "first-contentful-paint",
+ "Expected entryType to be: paint.");
+
t.done();
})
);
@@ -33,4 +51,4 @@
</script>
<div style="background-color:black;color:white;padding:20px;">...test...</div>
</body>
-</html>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/timing/PerformanceBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698