зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1059381 - Implement SimpleTest.requestCompleteLog for mochitest browser. r=jmaher
This commit is contained in:
Родитель
c197954a8c
Коммит
d7015095cb
|
@ -25,7 +25,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "ContentSearch",
|
|||
"resource:///modules/ContentSearch.jsm");
|
||||
|
||||
const SIMPLETEST_OVERRIDES =
|
||||
["ok", "is", "isnot", "ise", "todo", "todo_is", "todo_isnot", "info", "expectAssertions"];
|
||||
["ok", "is", "isnot", "ise", "todo", "todo_is", "todo_isnot", "info", "expectAssertions", "requestCompleteLog"];
|
||||
|
||||
window.addEventListener("load", function testOnLoad() {
|
||||
window.removeEventListener("load", testOnLoad);
|
||||
|
@ -908,6 +908,13 @@ function testScope(aTester, aTest) {
|
|||
});
|
||||
}
|
||||
};
|
||||
|
||||
this.requestCompleteLog = function test_requestCompleteLog() {
|
||||
self.__tester.dumper.structuredLogger.deactivateBuffering();
|
||||
self.registerCleanupFunction(function() {
|
||||
self.__tester.dumper.structuredLogger.activateBuffering();
|
||||
})
|
||||
};
|
||||
}
|
||||
testScope.prototype = {
|
||||
__done: true,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
function test() {
|
||||
SimpleTest.requestCompleteLog();
|
||||
ok(true, "pass ok");
|
||||
is(true, true, "pass is");
|
||||
isnot(false, true, "pass isnot");
|
||||
|
|
Загрузка…
Ссылка в новой задаче