Changeset 143804 in webkit


Ignore:
Timestamp:
Feb 22, 2013 2:57:14 PM (11 years ago)
Author:
eric@webkit.org
Message:

Teach the html5lib tests how to test the threaded HTML parser
https://bugs.webkit.org/show_bug.cgi?id=110643

Reviewed by Adam Barth.

Source/WebCore:

This adds a way to force data: url parsing to go through
the threaded parser, to enable us to test the threaded parser
using the html5lib test harness.

  • html/parser/HTMLParserOptions.cpp:

(WebCore::HTMLParserOptions::HTMLParserOptions):

  • page/Settings.in:

LayoutTests:

(window.onload):

  • html5lib/run-template-expected.txt:
  • html5lib/run-test10-expected.txt:
  • html5lib/run-test11-expected.txt:
  • html5lib/run-test12-expected.txt:
  • html5lib/run-test14-expected.txt:
  • html5lib/run-test15-expected.txt:
  • html5lib/run-test16-expected.txt:
  • html5lib/run-test17-expected.txt:
  • html5lib/run-test19-expected.txt:
  • html5lib/run-test2-expected.txt:
  • html5lib/run-test20-expected.txt:
  • html5lib/run-test21-expected.txt:
  • html5lib/run-test22-expected.txt:
  • html5lib/run-test23-expected.txt:
  • html5lib/run-test24-expected.txt:
  • html5lib/run-test25-expected.txt:
  • html5lib/run-test26-expected.txt:
  • html5lib/run-test3-expected.txt:
  • html5lib/run-test4-expected.txt:
  • html5lib/run-test5-expected.txt:
  • html5lib/run-test6-expected.txt:
  • html5lib/run-test8-expected.txt:
  • html5lib/run-test9-expected.txt:
  • html5lib/runner-expected.txt:
  • platform/chromium/html5lib/run-test1-expected.txt:
  • platform/chromium/html5lib/run-test18-expected.txt:
  • platform/chromium/html5lib/run-test7-expected.txt:
Location:
trunk
Files:
33 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r143802 r143804  
     12013-02-22  Eric Seidel  <eric@webkit.org>
     2
     3        Teach the html5lib tests how to test the threaded HTML parser
     4        https://bugs.webkit.org/show_bug.cgi?id=110643
     5
     6        Reviewed by Adam Barth.
     7
     8        * TestExpectations:
     9        * html5lib/resources/runner.js:
     10        (window.onload):
     11        * html5lib/run-template-expected.txt:
     12        * html5lib/run-test10-expected.txt:
     13        * html5lib/run-test11-expected.txt:
     14        * html5lib/run-test12-expected.txt:
     15        * html5lib/run-test14-expected.txt:
     16        * html5lib/run-test15-expected.txt:
     17        * html5lib/run-test16-expected.txt:
     18        * html5lib/run-test17-expected.txt:
     19        * html5lib/run-test19-expected.txt:
     20        * html5lib/run-test2-expected.txt:
     21        * html5lib/run-test20-expected.txt:
     22        * html5lib/run-test21-expected.txt:
     23        * html5lib/run-test22-expected.txt:
     24        * html5lib/run-test23-expected.txt:
     25        * html5lib/run-test24-expected.txt:
     26        * html5lib/run-test25-expected.txt:
     27        * html5lib/run-test26-expected.txt:
     28        * html5lib/run-test3-expected.txt:
     29        * html5lib/run-test4-expected.txt:
     30        * html5lib/run-test5-expected.txt:
     31        * html5lib/run-test6-expected.txt:
     32        * html5lib/run-test8-expected.txt:
     33        * html5lib/run-test9-expected.txt:
     34        * html5lib/runner-expected.txt:
     35        * platform/chromium/html5lib/run-test1-expected.txt:
     36        * platform/chromium/html5lib/run-test18-expected.txt:
     37        * platform/chromium/html5lib/run-test7-expected.txt:
     38
    1392013-02-22  Adam Barth  <abarth@webkit.org>
    240
  • trunk/LayoutTests/TestExpectations

    r143378 r143804  
    55# pending functional patch and per-port verification
    66webkit.org/b/109954 css3/line-break [ Skip ]
     7
     8# This runs all subtests through both the document.write
     9# parser and the (threaded) data: url parser.  The data: url
     10# harness is much slower, and the test should be broken
     11# up into smaller tests.
     12webkit.org/b/110642 html5lib/runner.html [ Slow ]
  • trunk/LayoutTests/html5lib/resources/runner.js

    r120190 r143804  
    5454{
    5555    stat.data = "Running";
     56    saved_test_files = window.test_files.slice();
     57    have_tested_threaded_parser = false;
    5658    run();
    5759}
     
    6062{
    6163    var xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");
    62     if (file = test_files.shift())
     64    file = test_files.shift()
     65    if (!file && !have_tested_threaded_parser) {
     66        var log_element = document.createElement('p');
     67        log_element.appendChild(document.createTextNode("Switching to data: url parser (threaded if available) and re-running..."));
     68        document.body.appendChild(log_element);
     69        if (window.internals && internals.settings.setUseThreadedHTMLParserForDataURLs)
     70            internals.settings.setUseThreadedHTMLParserForDataURLs(true);
     71        write = false;
     72        test_files = saved_test_files.slice();
     73        file = test_files.shift()
     74        have_tested_threaded_parser = true;
     75    }
     76    if (file)
    6377    {
    6478        stat.data = "Retriving " + file;
  • trunk/LayoutTests/html5lib/run-template-expected.txt

    r136467 r143804  
    11resources/template.dat: PASS
     2
     3Switching to data: url parser (threaded if available) and re-running...
     4
     5resources/template.dat: PASS
  • trunk/LayoutTests/html5lib/run-test10-expected.txt

    r103499 r143804  
    11resources/tests10.dat: PASS
     2
     3Switching to data: url parser (threaded if available) and re-running...
     4
     5resources/tests10.dat: PASS
  • trunk/LayoutTests/html5lib/run-test11-expected.txt

    r136657 r143804  
    22CONSOLE MESSAGE: Warning: Problem parsing viewBox=""
    33CONSOLE MESSAGE: Warning: Problem parsing viewBox=""
     4CONSOLE MESSAGE: line 1: Warning: Problem parsing viewBox=""
     5CONSOLE MESSAGE: line 1: Warning: Problem parsing viewBox=""
     6CONSOLE MESSAGE: line 1: Warning: Problem parsing viewBox=""
    47resources/tests11.dat: PASS
     8
     9Switching to data: url parser (threaded if available) and re-running...
     10
     11resources/tests11.dat: PASS
  • trunk/LayoutTests/html5lib/run-test12-expected.txt

    r103499 r143804  
    11resources/tests12.dat: PASS
     2
     3Switching to data: url parser (threaded if available) and re-running...
     4
     5resources/tests12.dat: PASS
  • trunk/LayoutTests/html5lib/run-test14-expected.txt

    r103499 r143804  
    11resources/tests14.dat: PASS
     2
     3Switching to data: url parser (threaded if available) and re-running...
     4
     5resources/tests14.dat: PASS
  • trunk/LayoutTests/html5lib/run-test15-expected.txt

    r103499 r143804  
    11resources/tests15.dat: PASS
     2
     3Switching to data: url parser (threaded if available) and re-running...
     4
     5resources/tests15.dat: PASS
  • trunk/LayoutTests/html5lib/run-test16-expected.txt

    r103499 r143804  
    11resources/tests16.dat: PASS
     2
     3Switching to data: url parser (threaded if available) and re-running...
     4
     5resources/tests16.dat: PASS
  • trunk/LayoutTests/html5lib/run-test17-expected.txt

    r103499 r143804  
    11resources/tests17.dat: PASS
     2
     3Switching to data: url parser (threaded if available) and re-running...
     4
     5resources/tests17.dat: PASS
  • trunk/LayoutTests/html5lib/run-test19-expected.txt

    r103499 r143804  
    11resources/tests19.dat: PASS
     2
     3Switching to data: url parser (threaded if available) and re-running...
     4
     5resources/tests19.dat: PASS
  • trunk/LayoutTests/html5lib/run-test2-expected.txt

    r103499 r143804  
    11resources/tests2.dat: PASS
     2
     3Switching to data: url parser (threaded if available) and re-running...
     4
     5resources/tests2.dat: PASS
  • trunk/LayoutTests/html5lib/run-test20-expected.txt

    r103499 r143804  
    11resources/tests20.dat: PASS
     2
     3Switching to data: url parser (threaded if available) and re-running...
     4
     5resources/tests20.dat: PASS
  • trunk/LayoutTests/html5lib/run-test21-expected.txt

    r103499 r143804  
    11resources/tests21.dat: PASS
     2
     3Switching to data: url parser (threaded if available) and re-running...
     4
     5resources/tests21.dat: PASS
  • trunk/LayoutTests/html5lib/run-test22-expected.txt

    r103499 r143804  
    11resources/test22.dat: PASS
     2
     3Switching to data: url parser (threaded if available) and re-running...
     4
     5resources/test22.dat: PASS
  • trunk/LayoutTests/html5lib/run-test23-expected.txt

    r103499 r143804  
    11resources/tests23.dat: PASS
     2
     3Switching to data: url parser (threaded if available) and re-running...
     4
     5resources/tests23.dat: PASS
  • trunk/LayoutTests/html5lib/run-test24-expected.txt

    r103499 r143804  
    11resources/tests24.dat: PASS
     2
     3Switching to data: url parser (threaded if available) and re-running...
     4
     5resources/tests24.dat: PASS
  • trunk/LayoutTests/html5lib/run-test25-expected.txt

    r103499 r143804  
    11resources/tests25.dat: PASS
     2
     3Switching to data: url parser (threaded if available) and re-running...
     4
     5resources/tests25.dat: PASS
  • trunk/LayoutTests/html5lib/run-test26-expected.txt

    r103499 r143804  
    11resources/tests26.dat: PASS
     2
     3Switching to data: url parser (threaded if available) and re-running...
     4
     5resources/tests26.dat: PASS
  • trunk/LayoutTests/html5lib/run-test3-expected.txt

    r103499 r143804  
    11resources/tests3.dat: PASS
     2
     3Switching to data: url parser (threaded if available) and re-running...
     4
     5resources/tests3.dat: PASS
  • trunk/LayoutTests/html5lib/run-test4-expected.txt

    r103499 r143804  
    11resources/tests4.dat: PASS
     2
     3Switching to data: url parser (threaded if available) and re-running...
     4
     5resources/tests4.dat: PASS
  • trunk/LayoutTests/html5lib/run-test5-expected.txt

    r103499 r143804  
    11resources/tests5.dat: PASS
     2
     3Switching to data: url parser (threaded if available) and re-running...
     4
     5resources/tests5.dat: PASS
  • trunk/LayoutTests/html5lib/run-test6-expected.txt

    r103499 r143804  
    11resources/tests6.dat: PASS
     2
     3Switching to data: url parser (threaded if available) and re-running...
     4
     5resources/tests6.dat: PASS
  • trunk/LayoutTests/html5lib/run-test8-expected.txt

    r103499 r143804  
    11resources/tests8.dat: PASS
     2
     3Switching to data: url parser (threaded if available) and re-running...
     4
     5resources/tests8.dat: PASS
  • trunk/LayoutTests/html5lib/run-test9-expected.txt

    r103499 r143804  
    11resources/tests9.dat: PASS
     2
     3Switching to data: url parser (threaded if available) and re-running...
     4
     5resources/tests9.dat: PASS
  • trunk/LayoutTests/html5lib/runner-expected.txt

    r128373 r143804  
    88CONSOLE MESSAGE: line 2: PASS
    99CONSOLE MESSAGE: line 2: FOO<span>BAR</span>BAZ
     10ALERT: Invalid test: #errors
     11#document-fragment
     12html
     13#document
     14| <head>
     15| <body>
     16
     17CONSOLE MESSAGE: line 3: PASS
     18CONSOLE MESSAGE: line 3: FOO<span>BAR</span>BAZ
    1019resources/adoption01.dat:
    112014
     
    106115
    107116resources/webkit02.dat: PASS
     117
     118Switching to data: url parser (threaded if available) and re-running...
     119
     120resources/adoption01.dat:
     12114
     122
     123Test 14 of 17 in resources/adoption01.dat failed. Input:
     124<div><a><b><div><div><div><div><div><div><div><div><div><div></a>
     125Got:
     126| <html>
     127|   <head>
     128|   <body>
     129|     <div>
     130|       <a>
     131|         <b>
     132|       <b>
     133|         <div>
     134|           <a>
     135|           <div>
     136|             <a>
     137|             <div>
     138|               <a>
     139|               <div>
     140|                 <a>
     141|                 <div>
     142|                   <a>
     143|                   <div>
     144|                     <a>
     145|                     <div>
     146|                       <a>
     147|                       <div>
     148|                         <a>
     149|                           <div>
     150|                             <div>
     151Expected:
     152| <html>
     153|   <head>
     154|   <body>
     155|     <div>
     156|       <a>
     157|         <b>
     158|       <b>
     159|         <div>
     160|           <a>
     161|           <div>
     162|             <a>
     163|             <div>
     164|               <a>
     165|               <div>
     166|                 <a>
     167|                 <div>
     168|                   <a>
     169|                   <div>
     170|                     <a>
     171|                     <div>
     172|                       <a>
     173|                       <div>
     174|                         <a>
     175|                         <div>
     176|                           <div>
     177resources/adoption02.dat: PASS
     178
     179resources/comments01.dat: PASS
     180
     181resources/doctype01.dat: PASS
     182
     183resources/domjs-unsafe.dat: PASS
     184
     185resources/entities01.dat: PASS
     186
     187resources/entities02.dat: PASS
     188
     189resources/html5test-com.dat: PASS
     190
     191resources/inbody01.dat: PASS
     192
     193resources/isindex.dat: PASS
     194
     195resources/pending-spec-changes-plain-text-unsafe.dat: PASS
     196
     197resources/pending-spec-changes.dat: PASS
     198
     199resources/plain-text-unsafe.dat: PASS
     200
     201resources/scriptdata01.dat: PASS
     202
     203resources/scripted/adoption01.dat: PASS
     204
     205resources/scripted/ark.dat: PASS
     206
     207resources/scripted/webkit01.dat: PASS
     208
     209resources/tables01.dat: PASS
     210
     211resources/tests_innerHTML_1.dat: PASS
     212
     213resources/tricky01.dat: PASS
     214
     215resources/webkit01.dat: PASS
     216
     217resources/webkit02.dat: PASS
  • trunk/LayoutTests/platform/chromium/html5lib/run-test1-expected.txt

    r103499 r143804  
     1CONSOLE MESSAGE: line 1: Uncaught SyntaxError: Unexpected token <
    12CONSOLE MESSAGE: line 1: Uncaught SyntaxError: Unexpected token <
    23resources/tests1.dat: PASS
     4
     5Switching to data: url parser (threaded if available) and re-running...
     6
     7resources/tests1.dat: PASS
  • trunk/LayoutTests/platform/chromium/html5lib/run-test18-expected.txt

    r103499 r143804  
     1CONSOLE MESSAGE: line 1: Uncaught SyntaxError: Unexpected token <
     2CONSOLE MESSAGE: line 1: Uncaught SyntaxError: Unexpected token <
     3CONSOLE MESSAGE: line 1: Uncaught SyntaxError: Unexpected token <
     4CONSOLE MESSAGE: line 1: Uncaught SyntaxError: Unexpected token <
    15CONSOLE MESSAGE: line 1: Uncaught SyntaxError: Unexpected token <
    26CONSOLE MESSAGE: line 1: Uncaught SyntaxError: Unexpected token <
     
    48CONSOLE MESSAGE: line 1: Uncaught SyntaxError: Unexpected token <
    59resources/tests18.dat: PASS
     10
     11Switching to data: url parser (threaded if available) and re-running...
     12
     13resources/tests18.dat: PASS
  • trunk/LayoutTests/platform/chromium/html5lib/run-test7-expected.txt

    r103499 r143804  
     1CONSOLE MESSAGE: line 1: Uncaught SyntaxError: Unexpected token <
    12CONSOLE MESSAGE: line 1: Uncaught SyntaxError: Unexpected token <
    23resources/tests7.dat: PASS
     4
     5Switching to data: url parser (threaded if available) and re-running...
     6
     7resources/tests7.dat: PASS
  • trunk/Source/WebCore/ChangeLog

    r143801 r143804  
     12013-02-22  Eric Seidel  <eric@webkit.org>
     2
     3        Teach the html5lib tests how to test the threaded HTML parser
     4        https://bugs.webkit.org/show_bug.cgi?id=110643
     5
     6        Reviewed by Adam Barth.
     7
     8        This adds a way to force data: url parsing to go through
     9        the threaded parser, to enable us to test the threaded parser
     10        using the html5lib test harness.
     11
     12        * html/parser/HTMLParserOptions.cpp:
     13        (WebCore::HTMLParserOptions::HTMLParserOptions):
     14        * page/Settings.in:
     15
    1162013-02-21  Ojan Vafai  <ojan@chromium.org>
    217
  • trunk/Source/WebCore/html/parser/HTMLParserOptions.cpp

    r140992 r143804  
    4444    // We force the main-thread parser for about:blank, javascript: and data: urls for compatibility
    4545    // with historical synchronous loading/parsing behavior of those schemes.
    46     useThreading = settings && settings->threadedHTMLParser() && !document->url().isBlankURL() && !document->url().protocolIsData();
     46    useThreading = settings && settings->threadedHTMLParser() && !document->url().isBlankURL()
     47        && (settings->useThreadedHTMLParserForDataURLs() || !document->url().protocolIsData());
    4748#else
    4849    useThreading = false;
  • trunk/Source/WebCore/page/Settings.in

    r143652 r143804  
    171171
    172172threadedHTMLParser initial=false, conditional=THREADED_HTML_PARSER
     173useThreadedHTMLParserForDataURLs initial=false, conditional=THREADED_HTML_PARSER
    173174
    174175# When enabled, window.blur() does not change focus, and
Note: See TracChangeset for help on using the changeset viewer.