@@ -82,8 +82,6 @@ private static class RecordingNavigationListener implements NavigationListener {
8282 public final BlockingQueue <Page > mOnPageDomContentLoadedEventFiredQueue =
8383 new LinkedBlockingQueue <>();
8484
85- public final BlockingQueue <Pair <Page , Long >> mOnFirstContentfulPaintMicrosQueue =
86- new LinkedBlockingQueue <>();
8785 public final BlockingQueue <Pair <Page , Long >> mOnFirstContentfulPaintQueue =
8886 new LinkedBlockingQueue <>();
8987 public final BlockingQueue <Pair <Page , Long >> mOnLargestContentfulPaintQueue =
@@ -124,11 +122,6 @@ public void onPageDomContentLoadedEvent(@NonNull Page page) {
124122
125123 }
126124
127- @ Override
128- public void onFirstContentfulPaint (@ NonNull Page page , long fcpDurationUs ) {
129- mOnFirstContentfulPaintMicrosQueue .add (new Pair <>(page , fcpDurationUs ));
130- }
131-
132125 @ Override
133126 public void onFirstContentfulPaintMillis (@ NonNull Page page , long fcpDurationMs ) {
134127 mOnFirstContentfulPaintQueue .add (new Pair <>(page , fcpDurationMs ));
@@ -151,7 +144,6 @@ public void clearRecordedEvents() {
151144 mOnPageDeletedQueue .clear ();
152145 mOnPageLoadEventFiredQueue .clear ();
153146 mOnPageDomContentLoadedEventFiredQueue .clear ();
154- mOnFirstContentfulPaintMicrosQueue .clear ();
155147 mOnFirstContentfulPaintQueue .clear ();
156148 mOnLargestContentfulPaintQueue .clear ();
157149 mOnPerformanceMarkQueue .clear ();
@@ -161,7 +153,7 @@ public void clearRecordedEvents() {
161153
162154 @ Before
163155 public void setUp () throws Exception {
164- WebkitUtils .checkFeature ((WebViewFeature .NAVIGATION_LISTENER_V1 ));
156+ WebkitUtils .checkFeature ((WebViewFeature .NAVIGATION_LISTENER ));
165157 mWebViewOnUiThread = new WebViewOnUiThread ();
166158 mWebServer = new MockWebServer ();
167159 mWebServer .setDispatcher (new TestDispatcher ());
@@ -356,12 +348,6 @@ public void isSamePageObject() {
356348 Page domContentLoadedPage = waitForNextQueueElement (
357349 mListener .mOnPageDomContentLoadedEventFiredQueue );
358350 Assert .assertEquals (navigationCompletePage , domContentLoadedPage );
359-
360- Pair <Page , Long > firstContentfulPaintMicros = waitForNextQueueElement (
361- mListener .mOnFirstContentfulPaintMicrosQueue );
362- Page firstContentfulPaintMicrosPage = firstContentfulPaintMicros .first ;
363- Assert .assertEquals (navigationCompletePage , firstContentfulPaintMicrosPage );
364- Assert .assertTrue (firstContentfulPaintMicros .second > 0 );
365351 }
366352
367353 // Tearing down the activity and WebView will delete the page.
@@ -370,8 +356,8 @@ public void isSamePageObject() {
370356 }
371357
372358 @ Test
373- public void isSamePageObject_listenerV2 () throws Exception {
374- WebkitUtils .checkFeature (WebViewFeature .NAVIGATION_LISTENER_V2 );
359+ public void isSamePageObject_listener () throws Exception {
360+ WebkitUtils .checkFeature (WebViewFeature .NAVIGATION_LISTENER );
375361 // Success URL is obtained outside of the activity scope in order to avoid a
376362 // StrictModeViolation for attempting to resolve the hostname on the main thread.
377363 final String successUrl = getSuccessUrl ();
@@ -426,7 +412,7 @@ public void isSamePageObject_listenerV2() throws Exception {
426412
427413 @ Test
428414 public void isSamePageObject_sameUrl () {
429- WebkitUtils .checkFeature (WebViewFeature .PAGE_GET_URL );
415+ WebkitUtils .checkFeature (WebViewFeature .NAVIGATION_LISTENER );
430416 final String successUrl = getSuccessUrl ();
431417 mWebViewOnUiThread .loadUrl (successUrl );
432418 Navigation completedNavigation = waitForNextQueueElement (
0 commit comments