Changeset 188901 in webkit


Ignore:
Timestamp:
Aug 24, 2015 6:48:18 PM (9 years ago)
Author:
commit-queue@webkit.org
Message:

AX: Fix accessibility/mac/search-with-frames.html test
https://bugs.webkit.org/show_bug.cgi?id=148313

Patch by Nan Wang <n_wang@apple.com> on 2015-08-24
Reviewed by Chris Fleizach.

Fixed the test by making sure that search is performed after all frames
have been loaded.

  • accessibility/mac/search-with-frames.html:
  • platform/mac/TestExpectations:
Location:
trunk/LayoutTests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r188899 r188901  
     12015-08-24  Nan Wang  <n_wang@apple.com>
     2
     3        AX: Fix accessibility/mac/search-with-frames.html test
     4        https://bugs.webkit.org/show_bug.cgi?id=148313
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Fixed the test by making sure that search is performed after all frames
     9        have been loaded.
     10
     11        * accessibility/mac/search-with-frames.html:
     12        * platform/mac/TestExpectations:
     13
    1142015-08-24  Alexey Proskuryakov  <ap@apple.com>
    215
  • trunk/LayoutTests/accessibility/mac/search-with-frames.html

    r188770 r188901  
    2626</script>
    2727<script>
     28   var frame1aLoaded = false;
     29   var frame2aLoaded = false;
     30   var frame3aLoaded = false;
     31   
    2832   for (var k = 1; k <= 3; k++) {
    2933
     
    3236
    3337      document.getElementById("frame" + k).onload = function(e) {
    34           var ifrm = document.createElement("iframe");
    35           ifrm.setAttribute("name", e.target.id + "a");
     38          var iframe = document.createElement("iframe");
     39          iframe.setAttribute("name", e.target.id + "a");
     40
     41          iframe.onload = function() {
     42              if (iframe.name == "frame1a")
     43                  frame1aLoaded = true;
     44              else if (iframe.name == "frame2a")
     45                  frame2aLoaded = true;
     46              else if (iframe.name == "frame3a")
     47                  frame3aLoaded = true;
     48             
     49              // Call runTest() when all frames have been loaded.
     50              if (frame1aLoaded && frame2aLoaded && frame3aLoaded)
     51                  runTest();
     52          };
    3653
    3754          if (e.target.id == "frame2") {
    38               ifrm.setAttribute("src", "data:text/html,<body><button id=button2>button2</button></body>");
     55              iframe.setAttribute("src", "data:text/html,<body><button id=button2>button2</button></body>");
    3956          } else {
    40               ifrm.setAttribute("src", "data:text/html,<body>text</body>");
     57              iframe.setAttribute("src", "data:text/html,<body>text</body>");
    4158          }
    4259
    43           ifrm.style.width = "200";
    44           ifrm.style.height = "200";
    45           this.contentDocument.childNodes[0].childNodes[1].appendChild(ifrm);
    46           if (e.target.id == "frame3") {
    47              ifrm.onload = function() {
    48                  // runTest() might run on the same call stack and the frame is not actually finished loading.
    49                  setTimeout("runTest()", 0);
    50              };
    51           }
     60          iframe.style.width = "200";
     61          iframe.style.height = "200";
     62          this.contentDocument.childNodes[0].childNodes[1].appendChild(iframe);
    5263       };
    5364    }
  • trunk/LayoutTests/platform/mac/TestExpectations

    r188893 r188901  
    485485http/tests/misc/willCacheResponse-delegate-callback.html [ Failure ]
    486486http/tests/xmlhttprequest/basic-auth-nopassword.html [ Failure ]
    487 
    488 accessibility/mac/search-with-frames.html [ Pass Failure ]
    489487
    490488# --- Plugins ---
Note: See TracChangeset for help on using the changeset viewer.