Changeset 249890 in webkit
- Timestamp:
- Sep 16, 2019 12:49:10 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r249889 r249890 1 2019-09-16 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 REGRESSION(r249142): [GTK] Epiphany delayed page loads continue indefinitely 4 https://bugs.webkit.org/show_bug.cgi?id=201544 5 6 Reviewed by Michael Catanzaro. 7 8 WebPageProxy::loadAlternateHTML() is an exception, because it's an API request but always sets the navigationID 9 to 0. We always want to reset the pending API request URL when alternate HTML load starts. 10 11 * UIProcess/WebPageProxy.cpp: 12 (WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared): Check also that it's an API alternate HTML load 13 to reset the pending API request URL. 14 1 15 2019-09-15 David Kilzer <ddkilzer@apple.com> 2 16 -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r249855 r249890 4048 4048 4049 4049 auto transaction = m_pageLoadState.transaction(); 4050 4051 if (navigation )4050 bool fromAlternateHTMLAPI = !unreachableURL.isEmpty() && unreachableURL == m_pageLoadState.pendingAPIRequestURL(); 4051 if (navigation || fromAlternateHTMLAPI) 4052 4052 m_pageLoadState.clearPendingAPIRequest(transaction); 4053 4053 -
trunk/Tools/ChangeLog
r249884 r249890 1 2019-09-16 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 REGRESSION(r249142): [GTK] Epiphany delayed page loads continue indefinitely 4 https://bugs.webkit.org/show_bug.cgi?id=201544 5 6 Reviewed by Michael Catanzaro. 7 8 Add new test cases. 9 10 * TestWebKitAPI/Tests/WebKitGLib/TestLoaderClient.cpp: 11 (testWebViewActiveURI): 12 (testWebViewIsLoading): 13 * TestWebKitAPI/glib/WebKitGLib/LoadTrackingTest.cpp: 14 (loadChangedCallback): 15 (LoadTrackingTest::loadAlternateHTML): 16 (LoadTrackingTest::reset): 17 * TestWebKitAPI/glib/WebKitGLib/LoadTrackingTest.h: 18 1 19 2019-09-15 David Kilzer <ddkilzer@apple.com> 2 20 -
trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestLoaderClient.cpp
r249759 r249890 293 293 } 294 294 295 void loadURIAndRedirectOnCommitted(const char* uri, const char* redirectURI) 296 { 297 reset(); 298 m_uriToLoadOnCommitted = redirectURI; 299 LoadTrackingTest::loadURI(uri); 300 } 301 295 302 void provisionalLoadStarted() 296 303 { … … 306 313 { 307 314 m_currentURIList[Commited] = m_currentURI; 315 if (!m_uriToLoadOnCommitted.isNull()) { 316 m_estimatedProgress = 0; 317 m_activeURI = m_uriToLoadOnCommitted; 318 webkit_web_view_load_uri(m_webView, m_uriToLoadOnCommitted.data()); 319 } 308 320 } 309 321 … … 312 324 m_currentURIList[Finished] = m_currentURI; 313 325 LoadTrackingTest::loadFinished(); 326 if (!m_uriToLoadOnCommitted.isNull()) 327 m_uriToLoadOnCommitted = { }; 314 328 } 315 329 … … 325 339 void reset() 326 340 { 327 m_currentURI = CString(); 341 m_currentURI = { }; 342 m_uriToLoadOnCommitted = { }; 328 343 m_currentURIList.clear(); 329 344 m_currentURIList.grow(m_currentURIList.capacity()); … … 331 346 332 347 CString m_currentURI; 348 CString m_uriToLoadOnCommitted; 333 349 Vector<CString, 4> m_currentURIList; 334 350 }; … … 416 432 test->checkURIAtState(ViewURITrackingTest::State::Commited, "/request-changed-on-redirect"); 417 433 test->checkURIAtState(ViewURITrackingTest::State::Finished, "/request-changed-on-redirect"); 434 435 test->loadURIAndRedirectOnCommitted(kServer->getURIForPath("/normal").data(), kServer->getURIForPath("/headers").data()); 436 test->waitUntilLoadFinished(); 437 test->checkURIAtState(ViewURITrackingTest::State::Provisional, "/normal"); 438 test->checkURIAtState(ViewURITrackingTest::State::ProvisionalAfterRedirect, nullptr); 439 test->checkURIAtState(ViewURITrackingTest::State::Commited, "/normal"); 440 // Pending API request is always updated immedately. 441 test->checkURIAtState(ViewURITrackingTest::State::Finished, "/headers"); 442 test->waitUntilLoadFinished(); 443 test->checkURIAtState(ViewURITrackingTest::State::Provisional, "/headers"); 444 test->checkURIAtState(ViewURITrackingTest::State::ProvisionalAfterRedirect, nullptr); 445 test->checkURIAtState(ViewURITrackingTest::State::Commited, "/headers"); 446 test->checkURIAtState(ViewURITrackingTest::State::Finished, "/headers"); 418 447 } 419 448 … … 455 484 test->loadURI(kServer->getURIForPath("/normal").data()); 456 485 test->waitUntilLoadFinished(); 486 g_assert_false(webkit_web_view_is_loading(test->m_webView)); 457 487 458 488 test->reload(); 459 489 test->waitUntilLoadFinished(); 490 g_assert_false(webkit_web_view_is_loading(test->m_webView)); 460 491 461 492 test->loadURI(kServer->getURIForPath("/error").data()); 462 493 test->waitUntilLoadFinished(); 494 g_assert_false(webkit_web_view_is_loading(test->m_webView)); 463 495 464 496 test->loadURI(kServer->getURIForPath("/normal").data()); 465 497 test->waitUntilLoadFinished(); 498 g_assert_false(webkit_web_view_is_loading(test->m_webView)); 466 499 test->loadURI(kServer->getURIForPath("/normal2").data()); 467 500 test->waitUntilLoadFinished(); 501 g_assert_false(webkit_web_view_is_loading(test->m_webView)); 468 502 469 503 test->goBack(); 470 504 test->waitUntilLoadFinished(); 505 g_assert_false(webkit_web_view_is_loading(test->m_webView)); 471 506 472 507 test->goForward(); 473 508 test->waitUntilLoadFinished(); 509 g_assert_false(webkit_web_view_is_loading(test->m_webView)); 510 511 test->loadAlternateHTML("<html><head><title>Title</title></head></html>", "file:///foo", nullptr); 512 test->waitUntilLoadFinished(); 513 g_assert_false(webkit_web_view_is_loading(test->m_webView)); 474 514 } 475 515 -
trunk/Tools/TestWebKitAPI/glib/WebKitGLib/LoadTrackingTest.cpp
r239772 r249890 32 32 g_assert_true(webkit_web_view_is_loading(webView)); 33 33 test->m_activeURI = webkit_web_view_get_uri(webView); 34 test->m_committedURI = test->m_activeURI; 34 35 if (!test->m_redirectURI.isNull()) 35 36 g_assert_cmpstr(test->m_redirectURI.data(), ==, test->m_activeURI.data()); … … 49 50 } 50 51 case WEBKIT_LOAD_FINISHED: 51 if (!test->m_loadFailed) { 52 if (!test->m_loadFailed) 53 g_assert_cmpstr(test->m_activeURI.data(), ==, webkit_web_view_get_uri(webView)); 54 55 // When a new load is started before the previous one has finished, we receive the load-finished signal 56 // of the ongoing load while we already have a provisional URL for the new load. This is the only case 57 // where isloading is true when the load has finished. 58 if (test->m_activeURI == test->m_committedURI) 52 59 g_assert_false(webkit_web_view_is_loading(webView)); 53 g_assert_cmpstr(test->m_activeURI.data(), ==, webkit_web_view_get_uri(webView)); 54 } else if (!g_error_matches(test->m_error.get(), WEBKIT_NETWORK_ERROR, WEBKIT_NETWORK_ERROR_CANCELLED)) { 55 // When a new load is started before the previous one has finished, we receive the load-finished signal 56 // of the ongoing load while we already have a provisional URL for the new load. This is the only case 57 // where isloading is true when the load has finished. 58 g_assert_false(webkit_web_view_is_loading(webView)); 59 } 60 60 61 test->loadFinished(); 61 62 break; … … 225 226 } 226 227 228 void LoadTrackingTest::loadAlternateHTML(const char* html, const char* contentURI, const char* baseURI) 229 { 230 reset(); 231 WebViewTest::loadAlternateHTML(html, contentURI, baseURI); 232 } 233 227 234 void LoadTrackingTest::reset() 228 235 { … … 232 239 m_estimatedProgress = 0; 233 240 m_error.reset(); 234 } 241 m_committedURI = { }; 242 } -
trunk/Tools/TestWebKitAPI/glib/WebKitGLib/LoadTrackingTest.h
r218685 r249890 47 47 void goBack(); 48 48 void goForward(); 49 void loadAlternateHTML(const char* html, const char* contentURI, const char* baseURI); 49 50 void reset(); 50 51 … … 66 67 float m_estimatedProgress; 67 68 CString m_redirectURI; 69 CString m_committedURI; 68 70 };
Note: See TracChangeset
for help on using the changeset viewer.