Title: [271878] trunk
Revision
271878
Author
rn...@webkit.org
Date
2021-01-25 22:56:21 -0800 (Mon, 25 Jan 2021)

Log Message

Unreviewed, reverting r271514 and r271549

Made TestWebKitAPI.WebKit.PrintFrame flaky

Reverted changeset:

"Use event loop to set title"
https://bugs.webkit.org/show_bug.cgi?id=218496
https://trac.webkit.org/changeset/271514

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (271877 => 271878)


--- trunk/LayoutTests/ChangeLog	2021-01-26 06:21:57 UTC (rev 271877)
+++ trunk/LayoutTests/ChangeLog	2021-01-26 06:56:21 UTC (rev 271878)
@@ -1,3 +1,15 @@
+2021-01-25  Ryosuke Niwa  <rn...@webkit.org>
+
+        Unreviewed, reverting r271514 and r271549
+
+        Made TestWebKitAPI.WebKit.PrintFrame flaky
+
+        Reverted changeset:
+
+        "Use event loop to set title"
+        https://bugs.webkit.org/show_bug.cgi?id=218496
+        https://trac.webkit.org/changeset/271514
+
 2021-01-25  Ryan Haddad  <ryanhad...@apple.com>
 
         Unreviewed test gardening.

Modified: trunk/LayoutTests/fast/dom/title-text-property-2.html (271877 => 271878)


--- trunk/LayoutTests/fast/dom/title-text-property-2.html	2021-01-26 06:21:57 UTC (rev 271877)
+++ trunk/LayoutTests/fast/dom/title-text-property-2.html	2021-01-26 06:56:21 UTC (rev 271878)
@@ -1,9 +1,8 @@
 <html>
 <head>
 <script>
-function startTest() {
+function runTests() {
     if (window.testRunner) {
-        testRunner.waitUntilDone();
         testRunner.dumpAsText();
         testRunner.dumpTitleChanges();
     }
@@ -11,19 +10,11 @@
     console.log("Setting document.title to TITLE1");    
     document.title = 'TITLE1';
 
-    internals.queueTask("DOMManipulation", () => continueTest());
-}
-
-function continueTest() {
     title = document.getElementsByTagName('title').item(0);
     
     console.log("Setting title element's text to TITLE2");
     title.text = 'TITLE2';
     
-    internals.queueTask("DOMManipulation", () => endTest());
-}
-
-function endTest() {
     newTitle = document.createElement('title');
     console.log("Should not set title");
     newTitle.appendChild(document.createTextNode('FAIL'));
@@ -37,12 +28,10 @@
         titleElement = titleElements[titleElements.length - 1];
         titleElement.parentNode.removeChild(titleElement);
     }
-
-    internals.queueTask("DOMManipulation", () => testRunner.notifyDone());
 }
 </script>
 <title>Initial title</title>
 </head> 
-<body _onload_="startTest();" >
+<body _onload_="runTests();" >
 </body>
 </html>

Modified: trunk/LayoutTests/fast/dom/title-text-property-assigning-empty-string.html (271877 => 271878)


--- trunk/LayoutTests/fast/dom/title-text-property-assigning-empty-string.html	2021-01-26 06:21:57 UTC (rev 271877)
+++ trunk/LayoutTests/fast/dom/title-text-property-assigning-empty-string.html	2021-01-26 06:56:21 UTC (rev 271878)
@@ -1,23 +1,17 @@
 <html>
 <head>
 <script>
-function startTest() {
+function runTests() {
     if (window.testRunner) {
-        testRunner.waitUntilDone();
         testRunner.dumpAsText();
         testRunner.dumpTitleChanges();
     }
 
     document.title = 'New non-empty title';
-    internals.queueTask("DOMManipulation", () => endTest())
-}
-
-function endTest() {
     document.title = '';
-    internals.queueTask("DOMManipulation", () => testRunner.notifyDone())
 }
 </script>
 </head>
-<body _onload_='startTest();'>
+<body _onload_='runTests();'>
 </body>
 </html>

Modified: trunk/LayoutTests/fast/dom/title-text-property.html (271877 => 271878)


--- trunk/LayoutTests/fast/dom/title-text-property.html	2021-01-26 06:21:57 UTC (rev 271877)
+++ trunk/LayoutTests/fast/dom/title-text-property.html	2021-01-26 06:56:21 UTC (rev 271878)
@@ -12,7 +12,6 @@
 
 function runTests() {
     if (window.testRunner) {
-        testRunner.waitUntilDone();
         testRunner.dumpAsText();
         testRunner.dumpTitleChanges();
     }
@@ -25,8 +24,6 @@
     titleElem.text = newTitle;
 
     debugOutput('New title is: \'' + titleElem.text + '\'');
-
-    internals.queueTask("DOMManipulation", () => testRunner.notifyDone());
 }
 </script>
 </head>

Modified: trunk/LayoutTests/http/tests/globalhistory/history-delegate-basic-title-expected.txt (271877 => 271878)


--- trunk/LayoutTests/http/tests/globalhistory/history-delegate-basic-title-expected.txt	2021-01-26 06:21:57 UTC (rev 271877)
+++ trunk/LayoutTests/http/tests/globalhistory/history-delegate-basic-title-expected.txt	2021-01-26 06:56:21 UTC (rev 271878)
@@ -1,3 +1,4 @@
 WebView navigated to url "http://127.0.0.1:8000/globalhistory/history-delegate-basic-title.html" with title "" with HTTP equivalent method "GET".  The navigation was successful and was not a client redirect.
+WebView updated the title for history URL "http://127.0.0.1:8000/globalhistory/history-delegate-basic-title.html" to "Test Title 1".
 WebView updated the title for history URL "http://127.0.0.1:8000/globalhistory/history-delegate-basic-title.html" to "Test Title 2".
 This test sees if the history delegate is notified of title changes.

Modified: trunk/LayoutTests/http/tests/globalhistory/history-delegate-basic-title.html (271877 => 271878)


--- trunk/LayoutTests/http/tests/globalhistory/history-delegate-basic-title.html	2021-01-26 06:21:57 UTC (rev 271877)
+++ trunk/LayoutTests/http/tests/globalhistory/history-delegate-basic-title.html	2021-01-26 06:56:21 UTC (rev 271878)
@@ -1,20 +1,15 @@
 <html>
 <head>
 <script>
-if (window.testRunner) {
-    testRunner.waitUntilDone();
+if (window.testRunner)
     testRunner.dumpAsText();
-}
 </script>
 <title>Test Title 1</title>
 </head>
-<body _onload_="runTest()">
+<body>
 This test sees if the history delegate is notified of title changes.
+</body>
 <script>
-function runTest() {
 document.title = "Test Title 2";
-internals.queueTask("DOMManipulation", () => testRunner.notifyDone());
-}
 </script>
-</body>
 </html>

Modified: trunk/LayoutTests/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt (271877 => 271878)


--- trunk/LayoutTests/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt	2021-01-26 06:21:57 UTC (rev 271877)
+++ trunk/LayoutTests/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt	2021-01-26 06:56:21 UTC (rev 271878)
@@ -5,8 +5,8 @@
 http://127.0.0.1:8000/loading/resources/basic-auth-testing.php?username=webkit&password=rocks - didReceiveAuthenticationChallenge - Responding with webkit:rocks
 frame "<!--frame1-->" - didCommitLoadForFrame
 frame "<!--frame1-->" - didFinishDocumentLoadForFrame
+frame "<!--frame1-->" - willPerformClientRedirectToURL: http://127.0.0.1:8000/a//b/non-existent-file.html
 frame "<!--frame1-->" - didHandleOnloadEventsForFrame
-frame "<!--frame1-->" - willPerformClientRedirectToURL: http://127.0.0.1:8000/a//b/non-existent-file.html
 main frame - didHandleOnloadEventsForFrame
 frame "<!--frame1-->" - didFinishLoadForFrame
 main frame - didFinishLoadForFrame
@@ -15,6 +15,5 @@
 frame "<!--frame1-->" - didCommitLoadForFrame
 frame "<!--frame1-->" - didReceiveTitle: 404 Not Found
 frame "<!--frame1-->" - didFinishDocumentLoadForFrame
-frame "<!--frame1-->" - didHandleOnloadEventsForFrame
-frame "<!--frame1-->" - didFinishLoadForFrame
+frame "<!--frame1-->" - didFailLoadWithError
 PASS did not cause assertion failure.

Modified: trunk/LayoutTests/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html (271877 => 271878)


--- trunk/LayoutTests/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html	2021-01-26 06:21:57 UTC (rev 271877)
+++ trunk/LayoutTests/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html	2021-01-26 06:56:21 UTC (rev 271878)
@@ -12,11 +12,9 @@
 
 function done()
 {
-    setTimeout(function() {
-        document.body.removeChild(document.getElementById("frame"));
-        if (window.testRunner)
-            testRunner.notifyDone();
-    }, 500);
+    document.body.removeChild(document.getElementById("frame"));
+    if (window.testRunner)
+        testRunner.notifyDone();
 }
 
 function notifyFrameDidLoad(frame)
@@ -26,8 +24,8 @@
 }
 </script>
 </head>
-<body _onload_="notifyFrameDidLoad(frame)">
-<iframe id="frame" src="" _onlad_="notifyFrameDidLoad(this)"></iframe>
+<body>
+<iframe id="frame" src="" _onload_="notifyFrameDidLoad(this)"></iframe>
 <p>PASS did not cause assertion failure.</p>
 </body>
 </html>

Modified: trunk/LayoutTests/http/tests/loading/redirect-with-no-location-crash-expected.txt (271877 => 271878)


--- trunk/LayoutTests/http/tests/loading/redirect-with-no-location-crash-expected.txt	2021-01-26 06:21:57 UTC (rev 271877)
+++ trunk/LayoutTests/http/tests/loading/redirect-with-no-location-crash-expected.txt	2021-01-26 06:56:21 UTC (rev 271878)
@@ -1,5 +1,6 @@
 main frame - didStartProvisionalLoadForFrame
 main frame - didCommitLoadForFrame
+main frame - didReceiveTitle: Test for https://bugs.webkit.org/show_bug.cgi?id=29293
 frame "<!--frame1-->" - didStartProvisionalLoadForFrame
 main frame - didFinishDocumentLoadForFrame
 frame "<!--frame1-->" - didCommitLoadForFrame

Modified: trunk/LayoutTests/http/tests/loading/redirect-with-no-location-crash.html (271877 => 271878)


--- trunk/LayoutTests/http/tests/loading/redirect-with-no-location-crash.html	2021-01-26 06:21:57 UTC (rev 271877)
+++ trunk/LayoutTests/http/tests/loading/redirect-with-no-location-crash.html	2021-01-26 06:56:21 UTC (rev 271878)
@@ -2,13 +2,11 @@
 <head>
     <!-- Test for https://bugs.webkit.org/show_bug.cgi?id=29293 -->
     <script>
-        if (window.testRunner) {
+        if (window.testRunner)
             testRunner.dumpAsText();
-            testRunner.waitUntilDone();
-        }
     </script>
 </head>
-<body _onload_="setTimeout(function() { if (window.testRunner) testRunner.notifyDone(); })">
+<body>
   <iframe src=""
 </body>
 <html>

Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (271877 => 271878)


--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2021-01-26 06:21:57 UTC (rev 271877)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2021-01-26 06:56:21 UTC (rev 271878)
@@ -583,7 +583,7 @@
 
 webkit.org/b/163136 http/tests/xmlhttprequest/auth-reject-protection-space.html [ Pass Failure ]
 
-#webkit.org/b/163139 http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html [ Pass Failure ]
+webkit.org/b/163139 http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html [ Pass Failure ]
 
 webkit.org/b/162975 http/tests/cache/disk-cache/memory-cache-revalidation-updates-disk-cache.html [ Pass Failure ]
 

Deleted: trunk/LayoutTests/platform/win/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt (271877 => 271878)


--- trunk/LayoutTests/platform/win/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt	2021-01-26 06:21:57 UTC (rev 271877)
+++ trunk/LayoutTests/platform/win/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt	2021-01-26 06:56:21 UTC (rev 271878)
@@ -1,20 +0,0 @@
-main frame - didStartProvisionalLoadForFrame
-main frame - didCommitLoadForFrame
-frame "<!--frame1-->" - didStartProvisionalLoadForFrame
-main frame - didFinishDocumentLoadForFrame
-http://127.0.0.1:8000/loading/resources/basic-auth-testing.php?username=webkit&password=rocks - didReceiveAuthenticationChallenge - Responding with webkit:rocks
-frame "<!--frame1-->" - didCommitLoadForFrame
-frame "<!--frame1-->" - didFinishDocumentLoadForFrame
-frame "<!--frame1-->" - didHandleOnloadEventsForFrame
-frame "<!--frame1-->" - willPerformClientRedirectToURL: http://127.0.0.1:8000/a//b/non-existent-file.html
-main frame - didHandleOnloadEventsForFrame
-frame "<!--frame1-->" - didFinishLoadForFrame
-main frame - didFinishLoadForFrame
-frame "<!--frame1-->" - didStartProvisionalLoadForFrame
-frame "<!--frame1-->" - didCancelClientRedirectForFrame
-frame "<!--frame1-->" - didCommitLoadForFrame
-frame "<!--frame1-->" - didFinishDocumentLoadForFrame
-frame "<!--frame1-->" - didHandleOnloadEventsForFrame
-frame "<!--frame1-->" - didFinishLoadForFrame
-frame "<!--frame1-->" - didReceiveTitle: 404 Not Found
-PASS did not cause assertion failure.

Modified: trunk/LayoutTests/platform/wk2/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt (271877 => 271878)


--- trunk/LayoutTests/platform/wk2/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt	2021-01-26 06:21:57 UTC (rev 271877)
+++ trunk/LayoutTests/platform/wk2/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt	2021-01-26 06:56:21 UTC (rev 271878)
@@ -5,8 +5,8 @@
 127.0.0.1:8000 - didReceiveAuthenticationChallenge - ProtectionSpaceAuthenticationSchemeHTTPBasic - Responding with webkit:rocks
 frame "<!--frame1-->" - didCommitLoadForFrame
 frame "<!--frame1-->" - didFinishDocumentLoadForFrame
+frame "<!--frame1-->" - willPerformClientRedirectToURL: http://127.0.0.1:8000/a//b/non-existent-file.html
 frame "<!--frame1-->" - didHandleOnloadEventsForFrame
-frame "<!--frame1-->" - willPerformClientRedirectToURL: http://127.0.0.1:8000/a//b/non-existent-file.html
 main frame - didHandleOnloadEventsForFrame
 frame "<!--frame1-->" - didFinishLoadForFrame
 main frame - didFinishLoadForFrame
@@ -13,8 +13,7 @@
 frame "<!--frame1-->" - didStartProvisionalLoadForFrame
 frame "<!--frame1-->" - didCancelClientRedirectForFrame
 frame "<!--frame1-->" - didCommitLoadForFrame
+frame "<!--frame1-->" - didReceiveTitle: 404 Not Found
 frame "<!--frame1-->" - didFinishDocumentLoadForFrame
-frame "<!--frame1-->" - didHandleOnloadEventsForFrame
-frame "<!--frame1-->" - didFinishLoadForFrame
-frame "<!--frame1-->" - didReceiveTitle: 404 Not Found
+frame "<!--frame1-->" - didFailLoadWithError
 PASS did not cause assertion failure.

Modified: trunk/LayoutTests/platform/wk2/http/tests/loading/redirect-with-no-location-crash-expected.txt (271877 => 271878)


--- trunk/LayoutTests/platform/wk2/http/tests/loading/redirect-with-no-location-crash-expected.txt	2021-01-26 06:21:57 UTC (rev 271877)
+++ trunk/LayoutTests/platform/wk2/http/tests/loading/redirect-with-no-location-crash-expected.txt	2021-01-26 06:56:21 UTC (rev 271878)
@@ -1,5 +1,6 @@
 main frame - didStartProvisionalLoadForFrame
 main frame - didCommitLoadForFrame
+main frame - didReceiveTitle: Test for https://bugs.webkit.org/show_bug.cgi?id=29293
 main frame - didFinishDocumentLoadForFrame
 frame "<!--frame1-->" - didStartProvisionalLoadForFrame
 frame "<!--frame1-->" - didCommitLoadForFrame

Modified: trunk/Source/WebCore/ChangeLog (271877 => 271878)


--- trunk/Source/WebCore/ChangeLog	2021-01-26 06:21:57 UTC (rev 271877)
+++ trunk/Source/WebCore/ChangeLog	2021-01-26 06:56:21 UTC (rev 271878)
@@ -1,3 +1,15 @@
+2021-01-25  Ryosuke Niwa  <rn...@webkit.org>
+
+        Unreviewed, reverting r271514 and r271549
+
+        Made TestWebKitAPI.WebKit.PrintFrame flaky
+
+        Reverted changeset:
+
+        "Use event loop to set title"
+        https://bugs.webkit.org/show_bug.cgi?id=218496
+        https://trac.webkit.org/changeset/271514
+
 2021-01-25  Zalan Bujtas  <za...@apple.com>
 
         [Legacy Line Layout] Multiple inline boxes may stretch the line

Modified: trunk/Source/WebCore/dom/Document.cpp (271877 => 271878)


--- trunk/Source/WebCore/dom/Document.cpp	2021-01-26 06:21:57 UTC (rev 271877)
+++ trunk/Source/WebCore/dom/Document.cpp	2021-01-26 06:56:21 UTC (rev 271878)
@@ -1675,14 +1675,8 @@
     m_title.string = canonicalizedTitle(*this, title.string);
     m_title.direction = title.direction;
 
-    if (!m_updateTitleTaskScheduled) {
-        eventLoop().queueTask(TaskSource::DOMManipulation, [protectedThis = makeRef(*this), this]() mutable {
-            m_updateTitleTaskScheduled = false;
-            if (auto documentLoader = makeRefPtr(loader()))
-                documentLoader->setTitle(m_title);
-        });
-        m_updateTitleTaskScheduled = true;
-    }
+    if (auto* loader = this->loader())
+        loader->setTitle(m_title);
 }
 
 void Document::updateTitleFromTitleElement()

Modified: trunk/Source/WebCore/dom/Document.h (271877 => 271878)


--- trunk/Source/WebCore/dom/Document.h	2021-01-26 06:21:57 UTC (rev 271877)
+++ trunk/Source/WebCore/dom/Document.h	2021-01-26 06:56:21 UTC (rev 271878)
@@ -2107,8 +2107,6 @@
     bool m_didDispatchViewportPropertiesChanged { false };
 #endif
 
-    bool m_updateTitleTaskScheduled { false };
-
     OrientationNotifier m_orientationNotifier;
     mutable RefPtr<Logger> m_logger;
     RefPtr<StringCallback> m_consoleMessageListener;

Modified: trunk/Tools/ChangeLog (271877 => 271878)


--- trunk/Tools/ChangeLog	2021-01-26 06:21:57 UTC (rev 271877)
+++ trunk/Tools/ChangeLog	2021-01-26 06:56:21 UTC (rev 271878)
@@ -1,3 +1,15 @@
+2021-01-25  Ryosuke Niwa  <rn...@webkit.org>
+
+        Unreviewed, reverting r271514 and r271549
+
+        Made TestWebKitAPI.WebKit.PrintFrame flaky
+
+        Reverted changeset:
+
+        "Use event loop to set title"
+        https://bugs.webkit.org/show_bug.cgi?id=218496
+        https://trac.webkit.org/changeset/271514
+
 2021-01-25  Wenson Hsieh  <wenson_hs...@apple.com>
 
         ASSERT NOT REACHED in WebCore::DisplayList::isDrawingItem

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit/PageLoadState.cpp (271877 => 271878)


--- trunk/Tools/TestWebKitAPI/Tests/WebKit/PageLoadState.cpp	2021-01-26 06:21:57 UTC (rev 271877)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit/PageLoadState.cpp	2021-01-26 06:56:21 UTC (rev 271878)
@@ -35,7 +35,6 @@
 namespace TestWebKitAPI {
 
 static bool test1Done;
-static bool titleChangeDone;
 
 struct PageLoadTestState {
     int didChangeActiveURL { 0 };
@@ -113,7 +112,6 @@
 {
     PageLoadTestState* state = reinterpret_cast<PageLoadTestState*>(const_cast<void*>(clientInfo));
     state->didChangeTitle++;
-    titleChangeDone = true;
 }
 
 static void didChangeWebProcessIsResponsive(const void* clientInfo)
@@ -280,14 +278,14 @@
     EXPECT_EQ(state.willChangeCanGoBack, 2);
     EXPECT_EQ(state.willChangeCanGoForward, 1);
 
-    titleChangeDone = false;
+    test1Done = false;
     url = "" "html"));
     WKPageLoadURL(webView.page(), url.get());
-    Util::run(&titleChangeDone);
+    Util::run(&test1Done);
 
     EXPECT_EQ(state.didChangeActiveURL, 4);
-    EXPECT_EQ(state.didChangeTitle, 1);
-    EXPECT_EQ(state.willChangeTitle, 1);
+    EXPECT_EQ(state.didChangeTitle, 2);
+    EXPECT_EQ(state.willChangeTitle, 2);
 
     WKPageSetPageStateClient(webView.page(), nullptr);
 

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm (271877 => 271878)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm	2021-01-26 06:21:57 UTC (rev 271877)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm	2021-01-26 06:56:21 UTC (rev 271878)
@@ -412,7 +412,7 @@
     auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);
     auto delegate = adoptNS([[PrintDelegate alloc] init]);
     [webView setUIDelegate:delegate.get()];
-    [webView loadHTMLString:@"<head><title>test_title</title></head><body _onload_='setTimeout(function() { print() });'>hello world!</body>" baseURL:[NSURL URLWithString:@"http://example.com/"]];
+    [webView loadHTMLString:@"<head><title>test_title</title></head><body _onload_='print()'>hello world!</body>" baseURL:[NSURL URLWithString:@"http://example.com/"]];
     TestWebKitAPI::Util::run(&done);
 
     NSPrintOperation *operation = [webView _printOperationWithPrintInfo:[NSPrintInfo sharedPrintInfo]];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to