Page MenuHomePhabricator

Assertion failure: "HTML string with doctype is parsed correctly"
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Run npm test

What happens?:
Even though this linebreak is expected and replaced, the assertion still fails.

Firefox 105.0 (Windows 10) ve transformStyleAttributes FAILED
        HTML string with doctype is parsed correctly (masking)
        Expected: "<!DOCTYPE html><html><head><title>Foo</title></head><body>Hello</body></html>"
        Actual: "<!DOCTYPE html>
        <html><head><title>Foo</title></head><body>Hello</body></html>"
        @tests/ve.test.js:737:11
        @tests/ve.test.js:730:8
        runTest@node_modules/qunit/qunit/qunit.js:2979:35
        run@node_modules/qunit/qunit/qunit.js:2962:16
        queue/runTest/<@node_modules/qunit/qunit/qunit.js:3253:16
        processTaskQueue@node_modules/qunit/qunit/qunit.js:2525:26
        processTaskQueue/<@node_modules/qunit/qunit/qunit.js:2529:29


        HTML string with doctype is parsed correctly (unmasking)
        Expected: "<!DOCTYPE html><html><head><title>Foo</title></head><body>Hello</body></html>"
        Actual: "<!DOCTYPE html>
        <html><head><title>Foo</title></head><body>Hello</body></html>"
        @tests/ve.test.js:747:10
        @tests/ve.test.js:730:8
        runTest@node_modules/qunit/qunit/qunit.js:2979:35
        run@node_modules/qunit/qunit/qunit.js:2962:16
        queue/runTest/<@node_modules/qunit/qunit/qunit.js:3253:16
        processTaskQueue@node_modules/qunit/qunit/qunit.js:2525:26
        processTaskQueue/<@node_modules/qunit/qunit/qunit.js:2529:29

What should have happened instead?:
Both HTML string with doctype is parsed correctly tests pass

Other information (browser name/version, screenshots, etc.):

  • Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0

Event Timeline

matmarex subscribed.

It turns out Firefox outputs a \r\n linebreak on Windows here.

Change 839676 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[VisualEditor/VisualEditor@master] Fix transformStyleAttributes tests on Firefox on Windows

https://gerrit.wikimedia.org/r/839676

Change 839676 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Fix transformStyleAttributes tests on Firefox on Windows

https://gerrit.wikimedia.org/r/839676

Change 840079 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (5dcc0f107)

https://gerrit.wikimedia.org/r/840079

Change 840079 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (5dcc0f107)

https://gerrit.wikimedia.org/r/840079