JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
change args, fix script parsing
[peach-html5-editor.git] / test.coffee
index 1e27066..58b1ed8 100644 (file)
@@ -7690,11 +7690,13 @@ tests = [
        }, {
                name: "webkit02.dat #2"
                html: "<p id=\"status\"><noscript><strong>A</strong></noscript><span>B</span></p>"
+               scripting: true
                errors: 1
                expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       id=\"status\"\n|       <noscript>\n|         \"<strong>A</strong>\"\n|       <span>\n|         \"B\"\n"
        }, {
                name: "webkit02.dat #3"
                html: "<p id=\"status\"><noscript><strong>A</strong></noscript><span>B</span></p>"
+               scripting: false
                errors: 1
                expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       id=\"status\"\n|       <noscript>\n|         <strong>\n|           \"A\"\n|       <span>\n|         \"B\"\n"
        }, {
@@ -7834,10 +7836,10 @@ test_parser = (args) ->
                return
        wheic.debug_log_reset()
        parse_errors = []
-       errors_cb = (i) ->
+       args.error_cb = (i) ->
                parse_errors.push i
        prev_node_id = 0 # reset counter
-       parsed = wheic.parse_html args.html, errors_cb
+       parsed = wheic.parse_html args
        serialized = serialize_els parsed
        if serialized isnt args.expected
                #wheic.debug_log_each (str) ->