}, {
name: "tests16.dat #84"
html: "<!doctype html><noscript><!--<noscript></noscript>--></noscript>"
+ scripting: true
errors: 1
expected: "| <!DOCTYPE html>\n| <html>\n| <head>\n| <noscript>\n| \"<!--<noscript>\"\n| <body>\n| \"-->\"\n"
}, {
name: "tests16.dat #85"
html: "<!doctype html><noscript><!--<noscript></noscript>--></noscript>"
+ scripting: false
expected: "| <!DOCTYPE html>\n| <html>\n| <head>\n| <noscript>\n| <!-- <noscript></noscript> -->\n| <body>\n"
}, {
name: "tests16.dat #86"
html: "<!doctype html><noscript><!--</noscript>X<noscript>--></noscript>"
+ scripting: true
expected: "| <!DOCTYPE html>\n| <html>\n| <head>\n| <noscript>\n| \"<!--\"\n| <body>\n| \"X\"\n| <noscript>\n| \"-->\"\n"
}, {
name: "tests16.dat #87"
html: "<!doctype html><noscript><!--</noscript>X<noscript>--></noscript>"
+ scripting: false
expected: "| <!DOCTYPE html>\n| <html>\n| <head>\n| <noscript>\n| <!-- </noscript>X<noscript> -->\n| <body>\n"
}, {
name: "tests16.dat #88"
html: "<!doctype html><noscript><iframe></noscript>X"
+ scripting: true
expected: "| <!DOCTYPE html>\n| <html>\n| <head>\n| <noscript>\n| \"<iframe>\"\n| <body>\n| \"X\"\n"
}, {
name: "tests16.dat #89"
html: "<!doctype html><noscript><iframe></noscript>X"
+ scripting: false
errors: 2
expected: "| <!DOCTYPE html>\n| <html>\n| <head>\n| <noscript>\n| <body>\n| <iframe>\n| \"</noscript>X\"\n"
}, {
}, {
name: "tests16.dat #181"
html: "<noscript><!--<noscript></noscript>--></noscript>"
+ scripting: true
errors: 2
expected: "| <html>\n| <head>\n| <noscript>\n| \"<!--<noscript>\"\n| <body>\n| \"-->\"\n"
}, {
name: "tests16.dat #182"
html: "<noscript><!--<noscript></noscript>--></noscript>"
+ scripting: false
errors: 1
expected: "| <html>\n| <head>\n| <noscript>\n| <!-- <noscript></noscript> -->\n| <body>\n"
}, {
name: "tests16.dat #183"
html: "<noscript><!--</noscript>X<noscript>--></noscript>"
+ scripting: true
errors: 1
expected: "| <html>\n| <head>\n| <noscript>\n| \"<!--\"\n| <body>\n| \"X\"\n| <noscript>\n| \"-->\"\n"
}, {
name: "tests16.dat #184"
html: "<noscript><!--</noscript>X<noscript>--></noscript>"
+ scripting: false
errors: 1
expected: "| <html>\n| <head>\n| <noscript>\n| <!-- </noscript>X<noscript> -->\n| <body>\n"
}, {
name: "tests16.dat #185"
html: "<noscript><iframe></noscript>X"
+ scripting: true
errors: 1
expected: "| <html>\n| <head>\n| <noscript>\n| \"<iframe>\"\n| <body>\n| \"X\"\n"
}, {
name: "tests16.dat #186"
html: "<noscript><iframe></noscript>X"
+ scripting: false
errors: 3
expected: "| <html>\n| <head>\n| <noscript>\n| <body>\n| <iframe>\n| \"</noscript>X\"\n"
}, {
}, {
name: "tests5.dat #16"
html: "<noscript><!--</noscript>--></noscript>"
+ scripting: true
errors: 2
expected: "| <html>\n| <head>\n| <noscript>\n| \"<!--\"\n| <body>\n| \"-->\"\n"
}, {
name: "tests5.dat #17"
html: "<noscript><!--</noscript>--></noscript>"
+ scripting: false
errors: 1
expected: "| <html>\n| <head>\n| <noscript>\n| <!-- </noscript> -->\n| <body>\n"
}, {
}, {
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"
}, {
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) ->