Title: [201323] trunk/LayoutTests
- Revision
- 201323
- Author
- y...@yoav.ws
- Date
- 2016-05-23 23:29:58 -0700 (Mon, 23 May 2016)
Log Message
Add a few initiator tests to resource timing.
https://bugs.webkit.org/show_bug.cgi?id=157986
Reviewed by Darin Adler.
Adds tests that make sure that when a resource is requested multiple times by different
elements, its initiator type remain the first one that triggered the fetch.
* http/tests/performance/performance-resource-timing-initiator-css-expected.txt: Added.
* http/tests/performance/performance-resource-timing-initiator-css.html: Added.
* http/tests/performance/performance-resource-timing-initiator-no-override-expected.txt: Added.
* http/tests/performance/performance-resource-timing-initiator-no-override.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (201322 => 201323)
--- trunk/LayoutTests/ChangeLog 2016-05-24 06:24:44 UTC (rev 201322)
+++ trunk/LayoutTests/ChangeLog 2016-05-24 06:29:58 UTC (rev 201323)
@@ -1,3 +1,18 @@
+2016-05-23 Yoav Weiss <y...@yoav.ws>
+
+ Add a few initiator tests to resource timing.
+ https://bugs.webkit.org/show_bug.cgi?id=157986
+
+ Reviewed by Darin Adler.
+
+ Adds tests that make sure that when a resource is requested multiple times by different
+ elements, its initiator type remain the first one that triggered the fetch.
+
+ * http/tests/performance/performance-resource-timing-initiator-css-expected.txt: Added.
+ * http/tests/performance/performance-resource-timing-initiator-css.html: Added.
+ * http/tests/performance/performance-resource-timing-initiator-no-override-expected.txt: Added.
+ * http/tests/performance/performance-resource-timing-initiator-no-override.html: Added.
+
2016-05-23 Zalan Bujtas <za...@apple.com>
Skip fast/table/neighboring-cells-when-collapsed-border-changes on WK1 for now.
Added: trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-css-expected.txt (0 => 201323)
--- trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-css-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-css-expected.txt 2016-05-24 06:29:58 UTC (rev 201323)
@@ -0,0 +1,2 @@
+PASS initiator is "css"
+
Added: trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-css.html (0 => 201323)
--- trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-css.html (rev 0)
+++ trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-css.html 2016-05-24 06:29:58 UTC (rev 201323)
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<script>
+ if (window.internals)
+ internals.setResourceTimingSupport(true);
+ if (window.testRunner) {
+ testRunner.dumpAsText()
+ testRunner.waitUntilDone();
+ }
+</script>
+<script src=""
+<body>
+<style>
+ body { background: url("../../resources/square100.png"); }
+</style>
+<script>
+ var initiator;
+ var runTest = function() {
+ var resources = performance.getEntriesByType('resource');
+ for (var i = 0; i < resources.length; ++i) {
+ if (resources[i].name.indexOf("square") != -1) {
+ initiator = resources[i].initiatorType;
+ shouldBeEqualToString("initiator", "css");
+ }
+ };
+ if (window.internals)
+ window.internals.setResourceTimingSupport(false);
+ if (window.testRunner)
+ testRunner.notifyDone();
+ };
+ window.addEventListener("load", function() {
+ runTest();
+ });
+</script>
+</body>
+</html>
Added: trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-no-override-expected.txt (0 => 201323)
--- trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-no-override-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-no-override-expected.txt 2016-05-24 06:29:58 UTC (rev 201323)
@@ -0,0 +1,2 @@
+PASS initiator is "img"
+
Added: trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-no-override.html (0 => 201323)
--- trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-no-override.html (rev 0)
+++ trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-no-override.html 2016-05-24 06:29:58 UTC (rev 201323)
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<script>
+ if (window.internals)
+ internals.setResourceTimingSupport(true);
+ if (window.testRunner) {
+ testRunner.dumpAsText()
+ testRunner.waitUntilDone();
+ }
+</script>
+<script src=""
+<body>
+<img src=""
+<style>
+ body { background: url("../../resources/square100.png"); }
+</style>
+<script>
+ var initiator;
+ var runTest = function() {
+ var resources = performance.getEntriesByType('resource');
+ for (var i = 0; i < resources.length; ++i) {
+ if (resources[i].name.indexOf("square") != -1) {
+ initiator = resources[i].initiatorType;
+ shouldBeEqualToString("initiator", "img");
+ }
+ };
+ if (window.internals)
+ window.internals.setResourceTimingSupport(false);
+ if (window.testRunner)
+ testRunner.notifyDone();
+ };
+ window.addEventListener("load", function() {
+ runTest();
+ });
+</script>
+</body>
+</html>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes