Non-fatal "Fatal Error"
-
George V. Reilly
Let's try that test case again. Lighthouse mangled the formatting.
d:\WebClient_JSTests>"C:\Windows\System32\java.exe" - Dfile.encoding=utf-8 -jar "dist\env-js.jar" "d:\WebClient_JSTests \test2.js" INFO: [Thu Sep 17 2009 18:13:16 GMT-0700 (PDT)] {ENVJS} adding value to history: file:/d:/WebClient_JSTests/index.html ERROR: [Thu Sep 17 2009 18:13:16 GMT-0700 (PDT)] {ENVJS} Fatal Error: Document: only comments, processing instructions, or whitespace allowed outside of document element Line: 1 Column: 1 Line: (line ?) ERROR: [Thu Sep 17 2009 18:13:16 GMT-0700 (PDT)] {ENVJS} ERROR: [Thu Sep 17 2009 18:13:16 GMT-0700 (PDT)] {ENVJS} [object Object] Line: (line ?) ERROR: [Thu Sep 17 2009 18:13:16 GMT-0700 (PDT)] {ENVJS} INFO: [Thu Sep 17 2009 18:13:16 GMT-0700 (PDT)] {ENVJS} Sucessfully loaded document at file:/d:/WebClient_JSTests/index.html PASS (1) [StringUtilTests] okay: Alpha PASS (2) [StringUtilTests] okay: Alpha and Beta PASS (3) [StringUtilTests] okay: Alpha, Beta, and Gamma PASS (4) [StringUtilTests] okay: Neither Alpha, Beta, nor Gamma PASS (5) [StringUtilTests] okay: Alpha, Beta, Gamma, and Delta PASS (6) [StringUtilTests] okay: Alpha, Beta, Gamma, or Delta 6 Passed, 0 Failed, 0 Errors, 6 Total Tests Rhino exit code: 0 ========= test2.js =============== load("dist/env.rhino.js"); window.onload = function() { load("test/testrunner.js"); load("StringUtil2.js"); results(); }; window.location = "index.html"; ======== StringUtil2.js =========== // Concatenate `words` into a comma-separated list, with `conjunction` as the final separator, // according to the normal rules of English. concatWordList = function(words, conjunction) { var n = words.length; conjunction = " " + (conjunction || "and") + " " ; // http://en.wikipedia.org/wiki/Serial_comma: place comma before a conjunction, for n > 2 conjunction = (n <= 1) ? "" : (n == 2) ? conjunction : "," + conjunction; return words.slice(0, -1).join(", ") + conjunction + words.slice (-1); }; module("StringUtilTests"); test("concatWordList", function() { expect(6); equals('Alpha', concatWordList(['Alpha'])); equals('Alpha and Beta', concatWordList(['Alpha', 'Beta'])); equals('Alpha, Beta, and Gamma', concatWordList(['Alpha', 'Beta', 'Gamma'])); equals('Neither Alpha, Beta, nor Gamma', 'Neither ' + concatWordList(['Alpha', 'Beta', 'Gamma'], 'nor')); equals('Alpha, Beta, Gamma, and Delta', concatWordList(['Alpha', 'Beta', 'Gamma', 'Delta'])); equals('Alpha, Beta, Gamma, or Delta', concatWordList(['Alpha', 'Beta', 'Gamma', 'Delta'], 'or')); }); ======== index.html =========== <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr" id="html"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>JavaScript Test Suite</title> <link rel="Stylesheet" media="screen" href="browser/ testsuite.css" /> <script type="text/javascript" src="../WebClient/scripts/third- party/jquery.js"></script> <script type="text/javascript" src="browser/testrunner.js"></ script> <script type="text/javascript" src="StringUtil2.js"></script> </head> <body id="body"> <h1 id="header">JavaScript Test Suite</h1> <h2 id="banner"></h2> <h2 id="userAgent"></h2> <!-- this iframe is outside the #main so it won't reload constantly wasting time, but it means the tests must be "safe" and clean up after themselves --> <iframe id="loadediframe" name="loadediframe" style="display:none;" src="browser/iframe.html"></iframe> <dl id="dl" style="display:none;"> <div id="main" style="display:none;"> </div> </dl> <ol id="tests"></ol> </body> </html> -
Thatcher
- State changed from new to open
- Milestone set to 1.1 Release
[responsible:id#36440 state:"open" milestone:id#49862 bulk edit command]
-
Thatcher
going to reassign this to 1.2 since we are trying to release 1.1 and this is not quite a blocker. Thanks for the detailed description though. It still is an issue though and the new parser for 1.2 will likely resolve it.
-
Thatcher
- Milestone cleared.
-
Thatcher
- State changed from open to resolved
- Milestone set to 1.1 Release
should be fixed with new html5 parsing engine integration
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.