Changeset 271878 in webkit


Ignore:
Timestamp:
Jan 25, 2021, 10:56:21 PM (4 years ago)
Author:
rniwa@webkit.org
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

Location:
trunk
Files:
1 deleted
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r271877 r271878  
     12021-01-25  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Unreviewed, reverting r271514 and r271549
     4
     5        Made TestWebKitAPI.WebKit.PrintFrame flaky
     6
     7        Reverted changeset:
     8
     9        "Use event loop to set title"
     10        https://bugs.webkit.org/show_bug.cgi?id=218496
     11        https://trac.webkit.org/changeset/271514
     12
    1132021-01-25  Ryan Haddad  <ryanhaddad@apple.com>
    214
  • trunk/LayoutTests/fast/dom/title-text-property-2.html

    r271514 r271878  
    22<head>
    33<script>
    4 function startTest() {
     4function runTests() {
    55    if (window.testRunner) {
    6         testRunner.waitUntilDone();
    76        testRunner.dumpAsText();
    87        testRunner.dumpTitleChanges();
     
    1211    document.title = 'TITLE1';
    1312
    14     internals.queueTask("DOMManipulation", () => continueTest());
    15 }
    16 
    17 function continueTest() {
    1813    title = document.getElementsByTagName('title').item(0);
    1914   
     
    2116    title.text = 'TITLE2';
    2217   
    23     internals.queueTask("DOMManipulation", () => endTest());
    24 }
    25 
    26 function endTest() {
    2718    newTitle = document.createElement('title');
    2819    console.log("Should not set title");
     
    3829        titleElement.parentNode.removeChild(titleElement);
    3930    }
    40 
    41     internals.queueTask("DOMManipulation", () => testRunner.notifyDone());
    4231}
    4332</script>
    4433<title>Initial title</title>
    4534</head>
    46 <body onload="startTest();" >
     35<body onload="runTests();" >
    4736</body>
    4837</html>
  • trunk/LayoutTests/fast/dom/title-text-property-assigning-empty-string.html

    r271514 r271878  
    22<head>
    33<script>
    4 function startTest() {
     4function runTests() {
    55    if (window.testRunner) {
    6         testRunner.waitUntilDone();
    76        testRunner.dumpAsText();
    87        testRunner.dumpTitleChanges();
     
    109
    1110    document.title = 'New non-empty title';
    12     internals.queueTask("DOMManipulation", () => endTest())
    13 }
    14 
    15 function endTest() {
    1611    document.title = '';
    17     internals.queueTask("DOMManipulation", () => testRunner.notifyDone())
    1812}
    1913</script>
    2014</head>
    21 <body onload='startTest();'>
     15<body onload='runTests();'>
    2216</body>
    2317</html>
  • trunk/LayoutTests/fast/dom/title-text-property.html

    r271514 r271878  
    1313function runTests() {
    1414    if (window.testRunner) {
    15         testRunner.waitUntilDone();
    1615        testRunner.dumpAsText();
    1716        testRunner.dumpTitleChanges();
     
    2625
    2726    debugOutput('New title is: \'' + titleElem.text + '\'');
    28 
    29     internals.queueTask("DOMManipulation", () => testRunner.notifyDone());
    3027}
    3128</script>
  • trunk/LayoutTests/http/tests/globalhistory/history-delegate-basic-title-expected.txt

    r271514 r271878  
    11WebView 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.
     2WebView updated the title for history URL "http://127.0.0.1:8000/globalhistory/history-delegate-basic-title.html" to "Test Title 1".
    23WebView updated the title for history URL "http://127.0.0.1:8000/globalhistory/history-delegate-basic-title.html" to "Test Title 2".
    34This test sees if the history delegate is notified of title changes.
  • trunk/LayoutTests/http/tests/globalhistory/history-delegate-basic-title.html

    r271514 r271878  
    22<head>
    33<script>
    4 if (window.testRunner) {
    5     testRunner.waitUntilDone();
     4if (window.testRunner)
    65    testRunner.dumpAsText();
    7 }
    86</script>
    97<title>Test Title 1</title>
    108</head>
    11 <body onload="runTest()">
     9<body>
    1210This test sees if the history delegate is notified of title changes.
     11</body>
    1312<script>
    14 function runTest() {
    1513document.title = "Test Title 2";
    16 internals.queueTask("DOMManipulation", () => testRunner.notifyDone());
    17 }
    1814</script>
    19 </body>
    2015</html>
  • trunk/LayoutTests/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt

    r271514 r271878  
    66frame "<!--frame1-->" - didCommitLoadForFrame
    77frame "<!--frame1-->" - didFinishDocumentLoadForFrame
     8frame "<!--frame1-->" - willPerformClientRedirectToURL: http://127.0.0.1:8000/a//b/non-existent-file.html
    89frame "<!--frame1-->" - didHandleOnloadEventsForFrame
    9 frame "<!--frame1-->" - willPerformClientRedirectToURL: http://127.0.0.1:8000/a//b/non-existent-file.html
    1010main frame - didHandleOnloadEventsForFrame
    1111frame "<!--frame1-->" - didFinishLoadForFrame
     
    1616frame "<!--frame1-->" - didReceiveTitle: 404 Not Found
    1717frame "<!--frame1-->" - didFinishDocumentLoadForFrame
    18 frame "<!--frame1-->" - didHandleOnloadEventsForFrame
    19 frame "<!--frame1-->" - didFinishLoadForFrame
     18frame "<!--frame1-->" - didFailLoadWithError
    2019PASS did not cause assertion failure.
  • trunk/LayoutTests/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html

    r271514 r271878  
    1313function done()
    1414{
    15     setTimeout(function() {
    16         document.body.removeChild(document.getElementById("frame"));
    17         if (window.testRunner)
    18             testRunner.notifyDone();
    19     }, 500);
     15    document.body.removeChild(document.getElementById("frame"));
     16    if (window.testRunner)
     17        testRunner.notifyDone();
    2018}
    2119
     
    2725</script>
    2826</head>
    29 <body onload="notifyFrameDidLoad(frame)">
    30 <iframe id="frame" src="resources/basic-auth-testing.php?username=webkit&password=rocks" onlad="notifyFrameDidLoad(this)"></iframe>
     27<body>
     28<iframe id="frame" src="resources/basic-auth-testing.php?username=webkit&password=rocks" onload="notifyFrameDidLoad(this)"></iframe>
    3129<p>PASS did not cause assertion failure.</p>
    3230</body>
  • trunk/LayoutTests/http/tests/loading/redirect-with-no-location-crash-expected.txt

    r271549 r271878  
    11main frame - didStartProvisionalLoadForFrame
    22main frame - didCommitLoadForFrame
     3main frame - didReceiveTitle: Test for https://bugs.webkit.org/show_bug.cgi?id=29293
    34frame "<!--frame1-->" - didStartProvisionalLoadForFrame
    45main frame - didFinishDocumentLoadForFrame
  • trunk/LayoutTests/http/tests/loading/redirect-with-no-location-crash.html

    r271549 r271878  
    33    <!-- Test for https://bugs.webkit.org/show_bug.cgi?id=29293 -->
    44    <script>
    5         if (window.testRunner) {
     5        if (window.testRunner)
    66            testRunner.dumpAsText();
    7             testRunner.waitUntilDone();
    8         }
    97    </script>
    108</head>
    11 <body onload="setTimeout(function() { if (window.testRunner) testRunner.notifyDone(); })">
     9<body>
    1210  <iframe src="resources/redirect-with-no-location-crash.php"></iframe>
    1311</body>
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r271514 r271878  
    584584webkit.org/b/163136 http/tests/xmlhttprequest/auth-reject-protection-space.html [ Pass Failure ]
    585585
    586 #webkit.org/b/163139 http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html [ Pass Failure ]
     586webkit.org/b/163139 http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html [ Pass Failure ]
    587587
    588588webkit.org/b/162975 http/tests/cache/disk-cache/memory-cache-revalidation-updates-disk-cache.html [ Pass Failure ]
  • trunk/LayoutTests/platform/wk2/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt

    r271514 r271878  
    66frame "<!--frame1-->" - didCommitLoadForFrame
    77frame "<!--frame1-->" - didFinishDocumentLoadForFrame
     8frame "<!--frame1-->" - willPerformClientRedirectToURL: http://127.0.0.1:8000/a//b/non-existent-file.html
    89frame "<!--frame1-->" - didHandleOnloadEventsForFrame
    9 frame "<!--frame1-->" - willPerformClientRedirectToURL: http://127.0.0.1:8000/a//b/non-existent-file.html
    1010main frame - didHandleOnloadEventsForFrame
    1111frame "<!--frame1-->" - didFinishLoadForFrame
     
    1414frame "<!--frame1-->" - didCancelClientRedirectForFrame
    1515frame "<!--frame1-->" - didCommitLoadForFrame
     16frame "<!--frame1-->" - didReceiveTitle: 404 Not Found
    1617frame "<!--frame1-->" - didFinishDocumentLoadForFrame
    17 frame "<!--frame1-->" - didHandleOnloadEventsForFrame
    18 frame "<!--frame1-->" - didFinishLoadForFrame
    19 frame "<!--frame1-->" - didReceiveTitle: 404 Not Found
     18frame "<!--frame1-->" - didFailLoadWithError
    2019PASS did not cause assertion failure.
  • trunk/LayoutTests/platform/wk2/http/tests/loading/redirect-with-no-location-crash-expected.txt

    r271549 r271878  
    11main frame - didStartProvisionalLoadForFrame
    22main frame - didCommitLoadForFrame
     3main frame - didReceiveTitle: Test for https://bugs.webkit.org/show_bug.cgi?id=29293
    34main frame - didFinishDocumentLoadForFrame
    45frame "<!--frame1-->" - didStartProvisionalLoadForFrame
  • trunk/Source/WebCore/ChangeLog

    r271875 r271878  
     12021-01-25  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Unreviewed, reverting r271514 and r271549
     4
     5        Made TestWebKitAPI.WebKit.PrintFrame flaky
     6
     7        Reverted changeset:
     8
     9        "Use event loop to set title"
     10        https://bugs.webkit.org/show_bug.cgi?id=218496
     11        https://trac.webkit.org/changeset/271514
     12
    1132021-01-25  Zalan Bujtas  <zalan@apple.com>
    214
  • trunk/Source/WebCore/dom/Document.cpp

    r271643 r271878  
    16761676    m_title.direction = title.direction;
    16771677
    1678     if (!m_updateTitleTaskScheduled) {
    1679         eventLoop().queueTask(TaskSource::DOMManipulation, [protectedThis = makeRef(*this), this]() mutable {
    1680             m_updateTitleTaskScheduled = false;
    1681             if (auto documentLoader = makeRefPtr(loader()))
    1682                 documentLoader->setTitle(m_title);
    1683         });
    1684         m_updateTitleTaskScheduled = true;
    1685     }
     1678    if (auto* loader = this->loader())
     1679        loader->setTitle(m_title);
    16861680}
    16871681
  • trunk/Source/WebCore/dom/Document.h

    r271643 r271878  
    21082108#endif
    21092109
    2110     bool m_updateTitleTaskScheduled { false };
    2111 
    21122110    OrientationNotifier m_orientationNotifier;
    21132111    mutable RefPtr<Logger> m_logger;
  • trunk/Tools/ChangeLog

    r271871 r271878  
     12021-01-25  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Unreviewed, reverting r271514 and r271549
     4
     5        Made TestWebKitAPI.WebKit.PrintFrame flaky
     6
     7        Reverted changeset:
     8
     9        "Use event loop to set title"
     10        https://bugs.webkit.org/show_bug.cgi?id=218496
     11        https://trac.webkit.org/changeset/271514
     12
    1132021-01-25  Wenson Hsieh  <wenson_hsieh@apple.com>
    214
  • trunk/Tools/TestWebKitAPI/Tests/WebKit/PageLoadState.cpp

    r271514 r271878  
    3636
    3737static bool test1Done;
    38 static bool titleChangeDone;
    3938
    4039struct PageLoadTestState {
     
    114113    PageLoadTestState* state = reinterpret_cast<PageLoadTestState*>(const_cast<void*>(clientInfo));
    115114    state->didChangeTitle++;
    116     titleChangeDone = true;
    117115}
    118116
     
    281279    EXPECT_EQ(state.willChangeCanGoForward, 1);
    282280
    283     titleChangeDone = false;
     281    test1Done = false;
    284282    url = adoptWK(Util::createURLForResource("set-long-title", "html"));
    285283    WKPageLoadURL(webView.page(), url.get());
    286     Util::run(&titleChangeDone);
     284    Util::run(&test1Done);
    287285
    288286    EXPECT_EQ(state.didChangeActiveURL, 4);
    289     EXPECT_EQ(state.didChangeTitle, 1);
    290     EXPECT_EQ(state.willChangeTitle, 1);
     287    EXPECT_EQ(state.didChangeTitle, 2);
     288    EXPECT_EQ(state.willChangeTitle, 2);
    291289
    292290    WKPageSetPageStateClient(webView.page(), nullptr);
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm

    r271514 r271878  
    413413    auto delegate = adoptNS([[PrintDelegate alloc] init]);
    414414    [webView setUIDelegate:delegate.get()];
    415     [webView loadHTMLString:@"<head><title>test_title</title></head><body onload='setTimeout(function() { print() });'>hello world!</body>" baseURL:[NSURL URLWithString:@"http://example.com/"]];
     415    [webView loadHTMLString:@"<head><title>test_title</title></head><body onload='print()'>hello world!</body>" baseURL:[NSURL URLWithString:@"http://example.com/"]];
    416416    TestWebKitAPI::Util::run(&done);
    417417
Note: See TracChangeset for help on using the changeset viewer.