WebKit Bugzilla
Attachment 349686 Details for
Bug 189560
: Add stability to tests for web API statistics
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189560-20180913112325.patch (text/plain), 13.49 KB, created by
Woodrow Wang
on 2018-09-13 11:23:26 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Woodrow Wang
Created:
2018-09-13 11:23:26 PDT
Size:
13.49 KB
patch
obsolete
>Subversion Revision: 235976 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 93cfb3fcb630080146970579b0c1336fc00418a4..f92a8c90196637d503b8978d92e6c843fe976f24 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,20 @@ >+2018-09-12 Woodrow Wang <woodrow_wang@apple.com> >+ >+ Add stability to tests for web API statistics >+ https://bugs.webkit.org/show_bug.cgi?id=189560 >+ <rdar://problem/44396413> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * http/tests/webAPIStatistics/canvas-read-and-write-data-collection-expected.txt: >+ * http/tests/webAPIStatistics/canvas-read-and-write-data-collection.html: >+ * http/tests/webAPIStatistics/font-load-data-collection-expected.txt: >+ * http/tests/webAPIStatistics/font-load-data-collection.html: >+ * http/tests/webAPIStatistics/navigator-functions-accessed-data-collection-expected.txt: >+ * http/tests/webAPIStatistics/navigator-functions-accessed-data-collection.html: >+ * http/tests/webAPIStatistics/screen-functions-accessed-data-collection-expected.txt: >+ * http/tests/webAPIStatistics/screen-functions-accessed-data-collection.html: >+ > 2018-09-10 Woodrow Wang <woodrow_wang@apple.com> > > Add Web API Statistics Collection >diff --git a/LayoutTests/http/tests/webAPIStatistics/canvas-read-and-write-data-collection-expected.txt b/LayoutTests/http/tests/webAPIStatistics/canvas-read-and-write-data-collection-expected.txt >index 16a6e6986af2c01396302f2e16e9d967b727934e..2f93abb33d22a306d8b19ec1a7515d30b28114f7 100644 >--- a/LayoutTests/http/tests/webAPIStatistics/canvas-read-and-write-data-collection-expected.txt >+++ b/LayoutTests/http/tests/webAPIStatistics/canvas-read-and-write-data-collection-expected.txt >@@ -1,12 +1,4 @@ > Tests for canvas read and write data collection in ResourceLoadStatistics plist by rendering and reading text on the canvas and dumping the entire resource load statistics map. >- >-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >- >- >-PASS successfullyParsed is true >- >-TEST COMPLETE >- > Resource load statistics: > > High level domain: 127.0.0.1 >@@ -21,9 +13,8 @@ High level domain: 127.0.0.1 > fontsSuccessfullyLoaded: > Helvetica > Times >- Courier > topFrameRegistrableDomainsWhichAccessedWebAPIs: >- 127.0.0.1: 8 >+ 127.0.0.1: 5 > canvasTextWritten: > suspicious invisible text > canvasReadData: Yes >diff --git a/LayoutTests/http/tests/webAPIStatistics/canvas-read-and-write-data-collection.html b/LayoutTests/http/tests/webAPIStatistics/canvas-read-and-write-data-collection.html >index 53f2b7c0124849d3c05930d274289bc9a3eec5e7..f04ebc88b1a5aadff2b513c21ccb2da0745a90e2 100644 >--- a/LayoutTests/http/tests/webAPIStatistics/canvas-read-and-write-data-collection.html >+++ b/LayoutTests/http/tests/webAPIStatistics/canvas-read-and-write-data-collection.html >@@ -2,17 +2,16 @@ > <head> > <meta charset="UTF-8"> > <title>Test for canvas read and write data collection in resource load statistics</title> >- <script src="/js-test-resources/js-test.js"></script> > </head> > <body> >+<p> Tests for canvas read and write data collection in ResourceLoadStatistics plist by rendering and reading text on the canvas and dumping the entire resource load statistics map. </p> > <script> >- description("Tests for canvas read and write data collection in ResourceLoadStatistics plist by rendering and reading text on the canvas and dumping the entire resource load statistics map."); >+ testRunner.dumpAsText(); >+ testRunner.dumpResourceLoadStatistics(); > const hostUnderTest = "127.0.0.1:8000"; > const statisticsUrl = "http://" + hostUnderTest + "/temp"; > >- function completeTest() { >- testRunner.dumpResourceLoadStatistics(); >- >+ function completeTest() { > testRunner.statisticsResetToConsistentState(function() { > testRunner.notifyDone(); > }); >@@ -33,7 +32,9 @@ > testRunner.waitUntilDone(); > internals.setResourceLoadStatisticsEnabled(true); > testRunner.setWebAPIStatisticsEnabled(true); >- runTestRunnerTest(); >+ testRunner.statisticsClearInMemoryAndPersistentStore(function() { >+ runTestRunnerTest(); >+ }); > } > </script> > </body> >diff --git a/LayoutTests/http/tests/webAPIStatistics/font-load-data-collection-expected.txt b/LayoutTests/http/tests/webAPIStatistics/font-load-data-collection-expected.txt >index a9ef32f34faab89b1bc211fff4c59be35601f791..542993001849ba50859e0222ec4e80ea92aaff37 100644 >--- a/LayoutTests/http/tests/webAPIStatistics/font-load-data-collection-expected.txt >+++ b/LayoutTests/http/tests/webAPIStatistics/font-load-data-collection-expected.txt >@@ -1,11 +1,5 @@ > Tests for font loading data collection in ResourceLoadStatistics plist by loading fonts and dumping the entire resource load statistics map. The test tries to load various fonts through a comma separated font-family list to draw a string with many m's since they differ in width more prominently among fonts. > >-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >- >- >-PASS successfullyParsed is true >- >-TEST COMPLETE > mmmmmmmmmmlli > Resource load statistics: > >@@ -24,8 +18,7 @@ High level domain: 127.0.0.1 > notARealFont > fontsSuccessfullyLoaded: > Times >- Courier > topFrameRegistrableDomainsWhichAccessedWebAPIs: >- 127.0.0.1: 9 >+ 127.0.0.1: 6 > canvasReadData: No > >diff --git a/LayoutTests/http/tests/webAPIStatistics/font-load-data-collection.html b/LayoutTests/http/tests/webAPIStatistics/font-load-data-collection.html >index 6fcd1a05fd9fa3a826409439eb1b2658d2e26064..0935040d023da49395f4eed48d83cb612966aaa6 100644 >--- a/LayoutTests/http/tests/webAPIStatistics/font-load-data-collection.html >+++ b/LayoutTests/http/tests/webAPIStatistics/font-load-data-collection.html >@@ -2,17 +2,16 @@ > <head> > <meta charset="UTF-8"> > <title>Test for font loading data collection in resource load statistics</title> >- <script src="/js-test-resources/js-test.js"></script> > </head> > <body> >+<p> Tests for font loading data collection in ResourceLoadStatistics plist by loading fonts and dumping the entire resource load statistics map. The test tries to load various fonts through a comma separated font-family list to draw a string with many m's since they differ in width more prominently among fonts. </p> > <script> >- description("Tests for font loading data collection in ResourceLoadStatistics plist by loading fonts and dumping the entire resource load statistics map. The test tries to load various fonts through a comma separated font-family list to draw a string with many m's since they differ in width more prominently among fonts."); >+ testRunner.dumpAsText(); >+ testRunner.dumpResourceLoadStatistics(); > const hostUnderTest = "127.0.0.1:8000"; > const statisticsUrl = "http://" + hostUnderTest + "/temp"; > >- function completeTest() { >- testRunner.dumpResourceLoadStatistics(); >- >+ function completeTest() { > testRunner.statisticsResetToConsistentState(function() { > testRunner.notifyDone(); > }); >@@ -37,7 +36,9 @@ > testRunner.waitUntilDone(); > internals.setResourceLoadStatisticsEnabled(true); > testRunner.setWebAPIStatisticsEnabled(true); >- runTestRunnerTest(); >+ testRunner.statisticsClearInMemoryAndPersistentStore(function() { >+ runTestRunnerTest(); >+ }); > } > </script> > </body> >diff --git a/LayoutTests/http/tests/webAPIStatistics/navigator-functions-accessed-data-collection-expected.txt b/LayoutTests/http/tests/webAPIStatistics/navigator-functions-accessed-data-collection-expected.txt >index 05310683d2ca1f8ef8e07de40635d4489184a24f..fff7755b46870b00944e43d6f151fb3f10edb8e0 100644 >--- a/LayoutTests/http/tests/webAPIStatistics/navigator-functions-accessed-data-collection-expected.txt >+++ b/LayoutTests/http/tests/webAPIStatistics/navigator-functions-accessed-data-collection-expected.txt >@@ -1,12 +1,4 @@ > Tests for navigator functions accessed data collection in ResourceLoadStatistics plist by querying for all the navigator properties and dumping the entire resource load statistics map. >- >-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >- >- >-PASS successfullyParsed is true >- >-TEST COMPLETE >- > Resource load statistics: > > High level domain: 127.0.0.1 >@@ -20,9 +12,8 @@ High level domain: 127.0.0.1 > isMarkedForCookieBlocking: No > fontsSuccessfullyLoaded: > Times >- Courier > topFrameRegistrableDomainsWhichAccessedWebAPIs: >- 127.0.0.1: 12 >+ 127.0.0.1: 9 > navigatorFunctionsAccessed: > appVersion > userAgent >diff --git a/LayoutTests/http/tests/webAPIStatistics/navigator-functions-accessed-data-collection.html b/LayoutTests/http/tests/webAPIStatistics/navigator-functions-accessed-data-collection.html >index cfac11d88858b485b9d55ea88da099f48b0cf54e..0567371548b0d9668b46aa7b192b84ec63508d6b 100644 >--- a/LayoutTests/http/tests/webAPIStatistics/navigator-functions-accessed-data-collection.html >+++ b/LayoutTests/http/tests/webAPIStatistics/navigator-functions-accessed-data-collection.html >@@ -2,17 +2,16 @@ > <head> > <meta charset="UTF-8"> > <title>Test for navigator functions accessed data collection in resource load statistics</title> >- <script src="/js-test-resources/js-test.js"></script> > </head> > <body> >+<p> Tests for navigator functions accessed data collection in ResourceLoadStatistics plist by querying for all the navigator properties and dumping the entire resource load statistics map. </p> > <script> >- description("Tests for navigator functions accessed data collection in ResourceLoadStatistics plist by querying for all the navigator properties and dumping the entire resource load statistics map."); >+ testRunner.dumpAsText(); >+ testRunner.dumpResourceLoadStatistics(); > const hostUnderTest = "127.0.0.1:8000"; > const statisticsUrl = "http://" + hostUnderTest + "/temp"; > > function completeTest() { >- testRunner.dumpResourceLoadStatistics(); >- > testRunner.statisticsResetToConsistentState(function() { > testRunner.notifyDone(); > }); >@@ -35,7 +34,9 @@ > testRunner.waitUntilDone(); > internals.setResourceLoadStatisticsEnabled(true); > testRunner.setWebAPIStatisticsEnabled(true); >- runTestRunnerTest(); >+ testRunner.statisticsClearInMemoryAndPersistentStore(function() { >+ runTestRunnerTest(); >+ }); > } > </script> > </body> >diff --git a/LayoutTests/http/tests/webAPIStatistics/screen-functions-accessed-data-collection-expected.txt b/LayoutTests/http/tests/webAPIStatistics/screen-functions-accessed-data-collection-expected.txt >index c1eaaa5d07abbaf29489d53d72a09618f73ce595..b8d5f6250e6a4267414aa126e6af21690168bcb2 100644 >--- a/LayoutTests/http/tests/webAPIStatistics/screen-functions-accessed-data-collection-expected.txt >+++ b/LayoutTests/http/tests/webAPIStatistics/screen-functions-accessed-data-collection-expected.txt >@@ -1,12 +1,4 @@ > Tests for screen functions accessed data collection in ResourceLoadStatistics plist by querying for all the screen properties and dumping the entire resource load statistics map. >- >-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >- >- >-PASS successfullyParsed is true >- >-TEST COMPLETE >- > Resource load statistics: > > High level domain: 127.0.0.1 >@@ -20,9 +12,8 @@ High level domain: 127.0.0.1 > isMarkedForCookieBlocking: No > fontsSuccessfullyLoaded: > Times >- Courier > topFrameRegistrableDomainsWhichAccessedWebAPIs: >- 127.0.0.1: 13 >+ 127.0.0.1: 10 > screenFunctionsAccessed: > height > width >diff --git a/LayoutTests/http/tests/webAPIStatistics/screen-functions-accessed-data-collection.html b/LayoutTests/http/tests/webAPIStatistics/screen-functions-accessed-data-collection.html >index 4a49203231f97389020f8cd548185999a6af081a..5c5c02033266b259b4aa01dbd0e778c7f370d6f6 100644 >--- a/LayoutTests/http/tests/webAPIStatistics/screen-functions-accessed-data-collection.html >+++ b/LayoutTests/http/tests/webAPIStatistics/screen-functions-accessed-data-collection.html >@@ -2,17 +2,16 @@ > <head> > <meta charset="UTF-8"> > <title>Test for screen functions accessed data collection in resource load statistics</title> >- <script src="/js-test-resources/js-test.js"></script> > </head> > <body> >+<p> Tests for screen functions accessed data collection in ResourceLoadStatistics plist by querying for all the screen properties and dumping the entire resource load statistics map. </p> > <script> >- description("Tests for screen functions accessed data collection in ResourceLoadStatistics plist by querying for all the screen properties and dumping the entire resource load statistics map."); >+ testRunner.dumpAsText(); >+ testRunner.dumpResourceLoadStatistics(); > const hostUnderTest = "127.0.0.1:8000"; > const statisticsUrl = "http://" + hostUnderTest + "/temp"; > >- function completeTest() { >- testRunner.dumpResourceLoadStatistics(); >- >+ function completeTest() { > testRunner.statisticsResetToConsistentState(function() { > testRunner.notifyDone(); > }); >@@ -37,7 +36,9 @@ > testRunner.waitUntilDone(); > internals.setResourceLoadStatisticsEnabled(true); > testRunner.setWebAPIStatisticsEnabled(true); >- runTestRunnerTest(); >+ testRunner.statisticsClearInMemoryAndPersistentStore(function() { >+ runTestRunnerTest(); >+ }); > } > </script> > </body>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189560
:
349586
|
349615
|
349622
|
349686
|
349717
|
349781
|
349787
|
349796
|
349804