WebKit Bugzilla
Attachment 349717 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-20180913171626.patch (text/plain), 13.76 KB, created by
Woodrow Wang
on 2018-09-13 17:16:27 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Woodrow Wang
Created:
2018-09-13 17:16:27 PDT
Size:
13.76 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..13f2e314e077d87c78dd1a9b5547680dafc18279 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,20 +2,17 @@ > <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(); >- >- testRunner.statisticsResetToConsistentState(function() { >- testRunner.notifyDone(); >- }); >+ function completeTest() { >+ testRunner.notifyDone(); > } > > function runTestRunnerTest() { >@@ -27,6 +24,7 @@ > var context = canvas.getContext('2d'); > context.fillText('suspicious invisible text', 2, 15); > canvas.toDataURL(); >+ testRunner.statisticsNotifyObserver(); > } > > if (document.location.host === hostUnderTest && window.testRunner && window.internals) { >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..73cc0bb28e86716f18131fa4d8f7b4599944c2f9 100644 >--- a/LayoutTests/http/tests/webAPIStatistics/font-load-data-collection.html >+++ b/LayoutTests/http/tests/webAPIStatistics/font-load-data-collection.html >@@ -2,20 +2,17 @@ > <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(); >- >- testRunner.statisticsResetToConsistentState(function() { >- testRunner.notifyDone(); >- }); >+ function completeTest() { >+ testRunner.notifyDone(); > } > > function runTestRunnerTest() { >@@ -31,6 +28,10 @@ > span.innerHTML = testFontString; > span.style.fontFamily = 'Andale, Fransiscan, notARealFont, serif'; > body.appendChild(span); >+ // Adds a timeout to allow font loads to be recorded >+ setTimeout(function() { >+ testRunner.statisticsNotifyObserver(); >+ }, 100); > } > > if (document.location.host === hostUnderTest && window.testRunner && window.internals) { >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..f175531ba4e4cd63d12a0ce8b173cc58cbf43a53 100644 >--- a/LayoutTests/http/tests/webAPIStatistics/navigator-functions-accessed-data-collection.html >+++ b/LayoutTests/http/tests/webAPIStatistics/navigator-functions-accessed-data-collection.html >@@ -2,20 +2,17 @@ > <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(); >- }); >+ testRunner.notifyDone(); > } > > function runTestRunnerTest() { >@@ -29,6 +26,7 @@ > var mimetypes = navigator.mimeTypes; > var plugins = navigator.plugins; > var appversion = navigator.appVersion; >+ testRunner.statisticsNotifyObserver(); > } > > if (document.location.host === hostUnderTest && window.testRunner && window.internals) { >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..877bd309b73abe290fb60f085dfd9b0b35c42cd9 100644 >--- a/LayoutTests/http/tests/webAPIStatistics/screen-functions-accessed-data-collection.html >+++ b/LayoutTests/http/tests/webAPIStatistics/screen-functions-accessed-data-collection.html >@@ -2,20 +2,17 @@ > <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(); >- >- testRunner.statisticsResetToConsistentState(function() { >- testRunner.notifyDone(); >- }); >+ function completeTest() { >+ testRunner.notifyDone(); > } > > function runTestRunnerTest() { >@@ -31,6 +28,7 @@ > var availLeft = screen.availLeft; > var availHeight = screen.availHeight; > var availWidth = screen.availWidth; >+ testRunner.statisticsNotifyObserver(); > } > > if (document.location.host === hostUnderTest && window.testRunner && window.internals) {
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