Skip to content
Snippets Groups Projects
  1. Jun 26, 2015
    • Mike Pennisi's avatar
      Complete migration of website assets · 15f9804e
      Mike Pennisi authored
      Update the URLs used by dynamic script loading code according to the new
      location of the recently-moved web site scripts.
      15f9804e
    • Mike Pennisi's avatar
      Move website scripts to a dedicated directory · b974c137
      Mike Pennisi authored
      Some JavaScript source files are only relevant in the context of the
      Test262 website. They should not be explicitly included by individual
      tests, so their presence in the `harness/` directory alongside "include"
      files is misleading.
      
      Move the scripts to a location within the `website/` directory to
      better-reflect their intended use. Update the relevant HTML templates
      with the new locations.
      b974c137
    • Mike Pennisi's avatar
      Remove support for legacy `$INCLUDE` syntax · 86c7e272
      Mike Pennisi authored
      Although test files once expressed dependencies on external files using
      a global `$INCLUDE` function, that pattern was removed in favor of
      declarative meta-data [1].
      
      Remove the associated logic from the Python runner and the browser.
      
      [1] See commit d4354d14.
      86c7e272
  2. Jun 18, 2015
    • Mike Pennisi's avatar
      Update browser runner to honor `onlyStrict` flag · cb617493
      Mike Pennisi authored
      Unlike the console runner, the browser runner does not modify the
      strictness of tests prior to running them. Regardless of a given test's
      metadata, it runs every test exactly once, and it never enables strict
      mode. This means that tests intended to function in strict mode must
      declare the "use strict"; directive prologue in addition to the
      `onlyStrict` flag.
      
      For any test that specifies the `onlyStrict` metadata flag, transform
      the source code by injecting a "use strict" directive prologue prior to
      running the test.
      cb617493
    • Mike Pennisi's avatar
      Update browser runner to inject `assert.js` · 73aa0627
      Mike Pennisi authored
      Since the Python runner was updated to include `assert.js` in all tests
      unconditionally, a number of tests have been written that implicitly
      rely on its presence. The browser runner does not currently provide this
      file's contents to these tests, so they fail unconditionally.
      
      Update the browser runner to inject that file's contents into every test
      context.
      
      Note: the existing approach to file retrieval (namely loading via
      synchronous XHR requests) is inefficient and deprecated in some
      browsers. It is honored here for the sake of consistency and to minimize
      the changeset necessary to fix the browser runner.
      73aa0627
  3. Dec 07, 2014
  4. Aug 13, 2014
    • Sam Mikes's avatar
      browser runner: check negative regex · 4debe087
      Sam Mikes authored
      1. use negative regex (instead of ".") to check iframeError
      2. make Test262Error.prototype.toString() always include
         the string Test262Error (no spaces) so it matches /Test262Error/
      3. modify check for supportsWindowOnerror - require that
         first argument (message) to onerror() contains the error name
         by checking for /Error:/.
      
      Change (3) above forces IE11 onto the !supportsWindowOnerror path.
      Test262 tests are run inside an eval() on IE11, and errors are
      caught and explicitly have toString() called.  Without this,
      IE11 passes only the `message` property to onerror(), and regexes
      that expect to match error name fail.
      
      sth: revert to simple `onerror` checking
      
      gs: refactor function `$DONE`
      
      refactor logic tree
      add support for async test failures
      
      ed.js: crude support for error typing
      
      S8.7.1_A2: cache result of delete
      
      `delete` has a side-effect and its
      return value depends on this; cache result of
      delete so when reporting result, we are always
      reporting the result that made us fail, not the
      result of a new delete
      [pedantic]
      
      ed: explicitly pass cooked error to $DONE
      
      gs: only let $DONE be called once
      4debe087
  5. Jul 30, 2014
    • Sam Mikes's avatar
      tools, harness: support new YAML frontmatter · c33bf0e0
      Sam Mikes authored
      parseTestRecord: add support for YAML frontmatter
      parseTestRecord: initial unit test for test record parser
      parseTestRecord: refactor for testing
      
      factor old parsing; add YAML parsing
      
      runner: support "includes" from YAML frontmatter
      
      support frontmatter "includes" in python runner
      use test.includes if present instead of scanning test code with regex
      
      harness: factor individual functions out into files
      
      tools: handle YAML errors
      
      tolerate missing keys in dictionary (flags, includes)
      report filename when empty frontmatter block
      new option --list-includes to test262.py
      
      harness: factor helper functions into separate files
      
      sth: remove extra close-paren (syntax error)
      
      test_common: TDD; failing parse of YAML
      
      common: use parseTestRecord (YAML-aware)
      c33bf0e0
  6. Jul 22, 2014
  7. Jul 21, 2014
    • Sam Mikes's avatar
      test262.py: only include helper scripts when needed · d4a3479a
      Sam Mikes authored
      test262.py: only supply async helper scripts when test is async
      sth.js: factor out function isAsyncTest()
      timer.js: improve workaround for async tests when Promise is defined but setTimeout is noot
      
      timer.js emulates setTimeout using Promise by doing a busy loop that checks
      if `timeout` milliseconds have elapsed.  Modified check to (timeLeft > 0) instead
      of (!timeLeft) to prevent infinite loop when check does not happen to run
      at precise millisecond timeout expires.
      
      Because test262.py did not support the $INCLUDE directive, some helper
      scripts were added to every test -- notably testIntl, timer, and donePrintHandle
      Now that $INCLUDE is supported, these can be dropped, speeding overall test run time
      d4a3479a
  8. Jul 15, 2014
  9. Jun 12, 2012
  10. Mar 28, 2012
  11. Feb 29, 2012
  12. Nov 11, 2011
  13. Sep 30, 2011
  14. Sep 26, 2011
  15. Sep 24, 2011
  16. Sep 13, 2011
  17. Sep 12, 2011
  18. Sep 08, 2011
  19. Aug 25, 2011
    • David Fugate's avatar
      test\harness\*: · 28718864
      David Fugate authored
      - a lot of JS harness code written in strings have been moved out to actual physical files
        such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
        case validator).  This change makes it far easier to maintain the test harness code
      - reorganized helper.js providing a clear indication which methods are used by external objects,
        which are implementation details, and which are unequivocally test262-specific.  I've also added,
        openErrorWindow, which will be used to open a descriptive error message window for each test case
        failure reported on the 'Run' tab
      - improved the error message for syntax errors occurring when a test case fails to load
      - sta.js no longer tries to pickle all helper functions it contains!  Instead, we load the file
        directly from sth.js.  The performance of fnGlobalObject has been improved.  Finally, the ES5Harness
        object has been moved from sth.js (in a string) to here
      - sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
        to handle test case failures in their own way (e.g., log to the filesystem).  The 'run' function was
        basically re-written
      
      Added 37 new test cases from the "IE Test Center" Build release.  There were 14 modifications to
      existing test cases as well.  Refactored SputnikGlobalScope.js such that test case paths are now used
      as indices into the GlobalScopeTests array.
      
      TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
      Also added support for one HTML test harness per ES5 chapter.  Last but not least, TestCasePackagerConfig.py
      now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
      generating *.json and *.html test chapters.
      28718864
  20. Jul 01, 2011
  21. Jun 07, 2011
  22. Apr 20, 2011
    • David Fugate's avatar
      A major web browser does not fire window.onerror for iframes when the iframe's document · ef45786a
      David Fugate authored
      contains a JavaScript syntax error (major test area).  Added a workaround.
      ef45786a
    • David Fugate's avatar
      *NOTE: this is a work-in-progress. Need to remove our dependency on a separate 'GlobalScope' · 545f2c34
      David Fugate authored
             directory next*
      
      SputnikConverter:
      - ES5TestCase.cs
      	* Case of JSON-based property names was wrong.  Fixed
      	* Use the tests' 'id' instead of 'path' as the GlobalScopeTests keys
      	* Added 'id' and 'path' as Global Scope test metadata.  The correct/clean solution here is to simply use 'path'
      	  as the key to GlobalScopeTests, but this refactoring needs to be undertaken later when we can convert the
      	  'normal' test cases over to use 'path' as the key as well
      	* Turns out we cannot depend on the message received by window.onerror to have some form of "syntax"
      	  contained within it.  Instead, we'll just rely on the regular expression ".", matches any one character,
      	  for the short term
      - SputnikTestCase.cs
      	* Same case issue as for ES5TestCases.cs
      	* Don't trust the Sputnik metadata for the ES5 section name or even test case id to be correct. Instead,
      	  generate this information from the file path of the test case
      
      
      TestCasePackager.py:
      - added a new global, GLOBAL_SCOPE_FILES, which is a list of JS files found directly under test\suite\*.js
        which include metadata for so-called globally scoped tests.  These files are imported directly by the HTML
        test harness
      
      test\suite\*:
      - regenerated Sputnik tests based on new converter
      
      default.html:
      - import SputnikGlobalScope.js.  Really TestCasePackager.py should generate the global scope imports to
        default.html automatically...
      
      
      website\resources\scripts\testcases\*:
      - test cases have shuffled from existing *.json files into globalscope.json
      545f2c34
  23. Apr 08, 2011
  24. Apr 07, 2011
  25. Mar 11, 2011
  26. Feb 08, 2011
    • David Fugate's avatar
      Added a test harness 'debug' mode to Simple Test Harness. Accessible via appending · 82c8d63e
      David Fugate authored
      "?sitedebug" to the end of the Test262 URL.
      
      There's a mismatch between the Test262 test harness and IE Test Center's harness
      which invalidated 15.4.4.17-5-1.js, 15.4.4.18-5-1.js, and 15.4.4.20-5-1.js on Test262.
      Essentially what's going on is Test262 uses the 'window' object as 'this' for the test
      case functions whereas IE Test Center uses the test case object housing the test case
      function as this.  This causes problems for test cases pertaining to scoping.  I've gone
      ahead and adjusted the Test262 tests to expect 'window' to be 'this', and will be updating
      IE Test Center's harness to use the 'window' object as well so we don't run into this
      problem again.
      82c8d63e
  27. Feb 04, 2011
    • David Fugate's avatar
      test\harness\helper.js: extended the 'finished' method to accept as input the... · e4d4a7a8
      David Fugate authored
      test\harness\helper.js:  extended the 'finished' method to accept as input the total elapsed execution time
                               of the tests.  Emit this to the activity bar
      
      
      test\harness\sta.js:  too many years of Python had me thinking JavaScript arrays have an append method:)  Fixed.
                            Also, added a pickled representation of all test helper functions found in this file
      
      
      test\harness\sth.js:  detached most test helper functions from the iframe's document object (as globals) and
                            inject these into the actual test cases. It's a bit slower and not as elegant, but it is
                            cleaner from an ES5 purist perspective.  Still need to move Sputnik helper functions into
                            sta.js
      
                            Extended Controller such that it now measures overall test execution time.  Such a change
                            is very useful for measuring performance-impact changes such as the aforementioned
                            improvement
      e4d4a7a8
  28. Feb 03, 2011
  29. Feb 02, 2011
  30. Jan 17, 2011
    • David Fugate's avatar
      - default.html still had a reference to reports.js. Removed. Also, removed... · 37859d33
      David Fugate authored
      - default.html still had a reference to reports.js.  Removed.  Also, removed test\harness\reports.js
      - test\harness\sth.js:  fixed a bug spotted by Mark Miller.  In short, we were allowing
        a test case return value of 'undefined' to be successful WRT IE Test Center tests because
        Sputnik tests normally return undefined (successful or not).  We now differentiate between
        Sputnik/IE Test Center when evaluating return values
      37859d33
  31. Nov 16, 2010
    • David Fugate's avatar
      Did a bit of refactoring on the test262 directory structure and propagated changes from · 35450e9e
      David Fugate authored
      website\* out to test\*:
      - Removed test\harness\ECMA-262-TOC.xml.  The casing on this file was incorrect, but
        more importantly it's a static file not generated by the harness
      - Populated test\harness with the contents of website\resources\scripts\global\.  In
        the future, we need to update test\harness\* and propagate these changes out to
        website\*
      - Test\suite\ietestcenter is now a verbatim copy of the IE Test Center tests that
        WERE under website\resources\scripts\testcases\*
      - Moved all Sputnik tests from website\resources\scripts\testcases\* out to
        test\suite\sputnik_converted
      - Moved website\resources\scripts\testcases\excludelist.xml out to test\config\*.  This
        particular file was only used for the test conversion process to XML, and is not actually
        needed by the website as best as I can tell
      - Website\resources\scripts\testcases now only contains the XMLized test cases.  This is
        the right thing to do as the *.js files here weren't actually being used by the website
        and the general public can now peruse the test cases directly via Mercurial
      35450e9e
  32. Nov 03, 2010
  33. Oct 19, 2010
    • David Fugate's avatar
      This commit includes Microsoft's initial contributions to Test262: · 73966429
      David Fugate authored
      - external\contributions\: test contributions to Test262 from external entities such as Microsoft and Google.
                                 This directory consists of the external tests without any modifications
      - test\harness\:  test harness used to run Test262 tests.  Presently web-based
      - test\suite\:    suite of vendor-neutral ECMAScript test cases conforming to the ES5 spec
      - tools\:         among other things this includes a set of tools used to convert various external test
                        contributions to a format the Test262 test harness can consume
      - website\:       an archived copy of the http://test262.ecmascript.org website
      73966429
Loading