Changeset 37657 in webkit


Ignore:
Timestamp:
Oct 17, 2008 11:07:22 AM (15 years ago)
Author:
pam@chromium.org
Message:

2008-10-17 Pamela Greene <pam@chromium.org>

Fix potential race by running two passes of test to defer notifyDone.
See https://bugs.webkit.org/show_bug.cgi?id=21576

Reviewed by Timothy Hatcher.

  • fast/history/resources/history_reload_window.html:
Location:
trunk/LayoutTests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r37634 r37657  
     12008-10-17  Pamela Greene  <pam@chromium.org>
     2
     3        Fix potential race by running two passes of test to defer notifyDone.
     4        See https://bugs.webkit.org/show_bug.cgi?id=21576
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * fast/history/resources/history_reload_window.html:
     9
    1102008-10-16  Julien Chaffraix  <jchaffraix@pleyo.com>
    211
  • trunk/LayoutTests/fast/history/resources/history_reload_window.html

    r24240 r37657  
    55            var tempConsole = document.getElementById('console');
    66            var console = window.opener.document.getElementById('console');
     7            // On the first pass, we'll temporarily set the output to
     8            // to failure, and then go(0).  On the second pass,
     9            // we set the output back to success and close the window.
    710            if (window.opener.i == 0) {
    811                tempConsole.innerHTML = 'Test Failed';
    912                console.innerHTML = tempConsole.innerHTML;
    10                 window.opener.i = window.opener.i + 1;
     13                window.opener.i = 1;
    1114                history.go(0);
    1215            } else {
    1316                console.innerHTML = tempConsole.innerHTML;
     17                window.opener.i = 2;
    1418                window.close();
    1519            }
     
    1822        function closed()
    1923        {
    20             if (window.layoutTestController)
    21                 opener.setTimeout("layoutTestController.notifyDone()", 0);
     24            if (window.opener.i == 2)
     25                if (window.layoutTestController)
     26                    opener.setTimeout("layoutTestController.notifyDone()", 0);
    2227        }
    2328        </script>
Note: See TracChangeset for help on using the changeset viewer.