Changeset 133934 in webkit


Ignore:
Timestamp:
Nov 8, 2012, 12:41:16 PM (12 years ago)
Author:
tony@chromium.org
Message:

Layout test editing/pasteboard/file-drag-to-editable.html flaky
https://bugs.webkit.org/show_bug.cgi?id=101092

Reviewed by Ryosuke Niwa.

Fix a flaky test. The problem was that we were confusing the test harness by
trying to do a navigation before the initial load finished (the notifyDone()
call did nothing because waitUntilDone() was missing). Depending on the state
of the frame loader when the test run, there was a race in whether or not we
would dump the results before or after completing the script execution.

Fix this by restructuring the test to run during onload and by calling notifyDone()
after the file load attempt failed.

  • editing/pasteboard/file-drag-to-editable-expected.txt:
  • editing/pasteboard/script-tests/file-drag-to-editable.js:

(runTest.window.onbeforeunload): Simplify and don't run nofityDone yet.
(runTest): Run test during onload event.

  • platform/chromium/TestExpectations: Remove flaky marker.
Location:
trunk/LayoutTests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r133932 r133934  
     12012-11-08  Tony Chang  <tony@chromium.org>
     2
     3        Layout test editing/pasteboard/file-drag-to-editable.html flaky
     4        https://bugs.webkit.org/show_bug.cgi?id=101092
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Fix a flaky test.  The problem was that we were confusing the test harness by
     9        trying to do a navigation before the initial load finished (the notifyDone()
     10        call did nothing because waitUntilDone() was missing).  Depending on the state
     11        of the frame loader when the test run, there was a race in whether or not we
     12        would dump the results before or after completing the script execution.
     13
     14        Fix this by restructuring the test to run during onload and by calling notifyDone()
     15        after the file load attempt failed.
     16
     17        * editing/pasteboard/file-drag-to-editable-expected.txt:
     18        * editing/pasteboard/script-tests/file-drag-to-editable.js:
     19        (runTest.window.onbeforeunload): Simplify and don't run nofityDone yet.
     20        (runTest): Run test during onload event.
     21        * platform/chromium/TestExpectations: Remove flaky marker.
     22
    1232012-11-08  Erik Arvidsson  <arv@chromium.org>
    224
  • trunk/LayoutTests/editing/pasteboard/file-drag-to-editable-expected.txt

    r74097 r133934  
    44
    55
     6PASS window.attemptedFileNavigation is true
    67PASS successfullyParsed is true
    78
  • trunk/LayoutTests/editing/pasteboard/script-tests/file-drag-to-editable.js

    r120173 r133934  
    2626{
    2727    window.onbeforeunload = function() {
    28         shouldBeTrue('successfullyParsed');
    29         debug('<br /><span class="pass">TEST COMPLETE</span>');
     28        window.attemptedFileNavigation = true;
    3029
    3130        // Don't remove the editable node, since we want to make sure there no stray file URLs were
    3231        // inserted during the drop.
    33 
    34         testRunner.notifyDone();
    35 
    36         window.onbeforeunload = null;
    3732    };
    3833    dragFilesOntoEditableArea(['DRTFakeFile']);
    39     testFailed('The test should have resulted in navigation');
     34
     35    shouldBeTrue("window.attemptedFileNavigation");
     36    finishJSTest();
    4037}
    4138
    4239var successfullyParsed = true;
    4340
    44 if (window.eventSender) {
    45     runTest();
     41if (window.eventSender && window.testRunner) {
     42    window.jsTestIsAsync = true;
     43
     44    window.onload = runTest;
    4645} else {
    4746    testFailed('This test is not interactive, please run using DumpRenderTree');
  • trunk/LayoutTests/platform/chromium/TestExpectations

    r133922 r133934  
    40754075webkit.org/b/101093 [ Mac ] fast/sub-pixel/float-wrap-zoom.html [ ImageOnlyFailure ]
    40764076
    4077 # Flaky since r133069
    4078 webkit.org/b/101092 [ Mac Win Debug ] editing/pasteboard/file-drag-to-editable.html [ Failure Pass ]
    4079 
    40804077# Crashy since at least r133035; gives a v8 error
    40814078webkit.org/b/101099 [ Linux Debug ] fast/files/workers/worker-apply-blob-url-to-xhr.html [ Crash Pass ]
Note: See TracChangeset for help on using the changeset viewer.