Platform/JS Compartments Mochitest: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 83: Line 83:
== Chunk 1 ==
== Chunk 1 ==


failed, 22848 tests
pass, 22848 tests
 
<pre>
http://mochi.test:8888/tests/content/base/test/test_CSP_frameancestors.html
 
This is what's in the error console, first one might not be relevant:
 
Error: function eval must be called directly, and not by way of a function of another name
 
Error: window.parent.parent.frameLoaded is not a function
Source File: http://example.com/tests/content/base/test/file_CSP_frameancestors.sjs?scriptedreport=ab_allow
Line: 1
 
Error: window.parent.parent.parent.frameLoaded is not a function
Source File: http://example.com/tests/content/base/test/file_CSP_frameancestors.sjs?double=1&scriptedreport=abb_allow
Line: 1
</pre>


== Chunk 2 ==
== Chunk 2 ==

Revision as of 15:51, 2 October 2010

This page is a tracking page for getting the JS compartments work to pass xpcshell tests and Mochitests and other automated test suites.

How to get the patch queue

Install hg queues.

Then add to .hg/patches/.hg/hgrc

[paths]

default = http://hg.mozilla.org/users/mrbkap_mozilla.com/brain-transplants

Then go into .hg/patches and hg pull, hg up and then go back to ../../ and do hg qpush -a. Build. Every time we update the queue you have to do qpop -a in the repository, then pull and update the patch queue, and then go back and do qpush -a to get the patches applied again.

Known issues still being worked on

QA

Started build for QA to test.

xpcshell

default compartment leaks

todo

done

bug 599761 (_newJSDContext)

bug 599762 (js::ctypes::CClosure::ClosureStub)

bug 600022 (XPCShellEnvironment::Init())

bug 600032 (JetpackChild::Init())

bug 600173 (atoms should always be in the default compartment)

bug 600580 (_newJSDContext, part 2)

bug 600402 (don't copy strings for the same compartment)

Mochitest

Run with python runtests.py --total-chunks=20 --this-chunk=n --autorun --debugger=gdb where n is the chunk you want to examine.

Remaining large-ish items

Post b7:

  • document.domain (we currently don't revoke access to the document's original domain, we probably should do that).
  • Error hacks?
  • XPCSafeJSObjectWrapper::WrapObject() fails
    -> remove XPCSafeJSObjectWrapper
  • Fix error messages for property access denied. Old message included two origins, new one doesn't, and it looks like we're not using any of the localization that the old message had. Error console should show both origins, exception message probably (?) shouldn't.
  • Confirm that the fix in docshell/test/chrome/test_bug454235.xul is appropriate.
  • We no longer support .wrappedJSObject on location and XMLHttpRequest. Confirm that it was ok to remove those from tests/js/src/xpconnect/tests/mochitest/test_bug553407.html.

FIXED issues:

  • Fix up XrayWrappers
  • Make chrome wrappers expose nothing by default
  • added scriptOnly check to chrome object and make all XOWs script only
  • Location object
  • nsJSContext::BindCompiledEventHandler(), target and funobj from
  • Components.utils.import() from non-chrome code.
  • DocShell navigation tests
  • XPCNativeWrapper.unwrap() different compartments
  • IndexedDB and DOM worker tests, need cross compartment structured clone (jorendorff/bent)
  • XPCNW holder objects vs JS_ClearScope()

failing tests:

http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/test_updatingManifest.html

Make chrome tests:

[TODO] http://mochi.test:8888/tests/js/src/xpconnect/tests/mochitest/test_cows.html
[Done] /tests/js/src/xpconnect/tests/mochitest/test_bug484459.html (XPCSafeJSObjectWrapper)
[Done but real failures] /tests/js/src/xpconnect/tests/mochitest/test_wrappers.html (XPCSafeJSObjectWrapper)

Chunk 1

pass, 22848 tests

Chunk 2

pass, 11244 tests:

Chunk 3

pass, 14532 tests

Chunk 4

passed, 19311 tests

Chunk 5

pass, 4977 tests

Chunk 6

failed, 4825 tests

http://mochi.test:8888/tests/dom/tests/mochitest/bugs/test_bug346659.html

Error: win.childWin is undefined
Source File: http://mochi.test:8888/tests/dom/tests/mochitest/bugs/test_bug346659.html
Line: 51

http://mochi.test:8888/tests/dom/tests/mochitest/bugs/test_bug440572.html

failed | test in frame failed. - got "TypeError: parent[name] is undefined", expected "success"

Chunk 7

pass, 194 tests

Chunk 8

pass, 346 tests

Chunk 9

pass, 159 tests

Chunk 10

pass, 396 tests

Chunk 11

pass, 234 tests

Chunk 12

pass, 396 tests

Chunk 13

pass, 458 tests

Chunk 14

pass, 482 tests

Chunk 15

pass, 491 tests

Chunk 16

pass, 7163 tests

Chunk 17

failed, 573 tests (sloooooooooow to run)

This test fails but it looks like a bad test. It enables UniversalXPConnect and then complains that it can do cross origin access.

http://mochi.test:8888/tests/js/src/xpconnect/tests/mochitest/test_bug504877.html

Chunk 18

pass, 5073 tests

Chunk 19

pass, 89415 tests

  • bent: I fixed test_pluginstream_newstream.html so that it will work, but the underlying cause is a change in our access denied exception messages, which needs to get fixed. Followup bug?

Chunk 20

pass, 17909 tests

Mochichrome

35 failing tests, in these files:

chrome://mochikit/content/chrome/js/src/xpconnect/tests/chrome/test_cows.xul

chrome://mochikit/content/chrome/js/src/xpconnect/tests/chrome/test_evalInSandbox.xul
 -> add a function that the sandbox can call which forwards to getClassName

chrome://mochikit/content/chrome/js/src/xpconnect/tests/chrome/test_wrappers-2.xul
  -> enumeration?

chrome://mochikit/content/chrome/layout/base/test/chrome/test_printpreview.xul

Browserchrome