mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 947044 - Part 2: Fix tests that check ReferenceError's message. r=gavin
This commit is contained in:
parent
42d6d7fbc5
commit
81c814e0ef
@ -105,7 +105,7 @@ function test() {
|
||||
function test1(aCallback) {
|
||||
gDebugger.once(gDebugger.EVENTS.FETCHED_WATCH_EXPRESSIONS, () => {
|
||||
checkWatchExpressions(26, {
|
||||
a: "ReferenceError: a is not defined",
|
||||
a: "ReferenceError: a is not defined, did you mean 'z'?",
|
||||
this: { type: "object", class: "Object" },
|
||||
prop: { type: "object", class: "String" },
|
||||
args: { type: "undefined" }
|
||||
|
@ -33,7 +33,8 @@ window.onerror = function(message, uri, line) {
|
||||
</script>
|
||||
<script type="application/javascript">
|
||||
window.onerror = function(message, uri, line) {
|
||||
is(message, "ReferenceError: c is not defined", "Should have correct error message");
|
||||
ok(message.contains("ReferenceError: c is not defined"),
|
||||
"Should have correct error message");
|
||||
is(uri,
|
||||
"http://mochi.test:8888/tests/content/base/test/bug461735-redirect2.sjs",
|
||||
"Unexpected error location URI");
|
||||
|
@ -38,7 +38,8 @@ window.onerror = function(message, uri, line) {
|
||||
errorFired = false;
|
||||
global = "";
|
||||
window.onerror = function(message, uri, line) {
|
||||
is(message, "ReferenceError: c is not defined", "Should have correct error message");
|
||||
ok(message.contains("ReferenceError: c is not defined"),
|
||||
"Should have correct error message");
|
||||
is(uri,
|
||||
"http://example.com/tests/content/base/test/bug696301-script-1.js",
|
||||
"Should also have correct script URI");
|
||||
|
@ -40,7 +40,8 @@ window.onerror = function(message, uri, line) {
|
||||
errorFired = false;
|
||||
global = "";
|
||||
window.onerror = function(message, uri, line) {
|
||||
is(message, "ReferenceError: c is not defined", "Should have correct error message");
|
||||
ok(message.contains("ReferenceError: c is not defined"),
|
||||
"Should have correct error message");
|
||||
is(uri,
|
||||
"http://example.com/tests/content/base/test/bug696301-script-1.js",
|
||||
"Should also have correct script URI");
|
||||
|
@ -31,7 +31,7 @@ var expected = [
|
||||
{ name: "", message: "uncaught exception: [object Object]" },
|
||||
{ name: "InvalidStateError", message: "An attempt was made to use an object that is not, or is no longer, usable", filename: location, lineNumber: 60 },
|
||||
{ name: "ReferenceError", message: "xxx is not defined", filename: location, lineNumber: 64 },
|
||||
{ name: "ReferenceError", message: "xxx is not defined", filename: location, lineNumber: 66 }
|
||||
{ name: "ReferenceError", message: "xxx is not defined, did you mean 'x'?", filename: location, lineNumber: 66 }
|
||||
];
|
||||
|
||||
var counter = 0;
|
||||
|
@ -52,7 +52,7 @@ Tests of DOM Worker Threads (Bug 437152)
|
||||
worker.onerror = function(otherEvent) {
|
||||
otherEvent.preventDefault();
|
||||
is(otherEvent.target, worker);
|
||||
is(otherEvent.message, "ReferenceError: Components is not defined");
|
||||
ok(otherEvent.message.contains("ReferenceError: Components is not defined"));
|
||||
gotErrors = true;
|
||||
|
||||
worker.onerror = function(oneMoreEvent) {
|
||||
|
@ -20,7 +20,7 @@ function test()
|
||||
printBugNumber(BUGNUMBER);
|
||||
printStatus (summary);
|
||||
|
||||
expect = 'ReferenceError: x is not defined';
|
||||
expect = "ReferenceError: x is not defined, did you mean 'gc'?";
|
||||
try
|
||||
{
|
||||
delete (0 ? 3 : x());
|
||||
|
@ -23,7 +23,7 @@ var b = 45;
|
||||
};
|
||||
})();
|
||||
|
||||
expect = 'ReferenceError: a is not defined | undefined | 45';
|
||||
expect = "ReferenceError: a is not defined, did you mean 'b'? | undefined | 45";
|
||||
actual = '';
|
||||
|
||||
var foo;
|
||||
|
@ -20,7 +20,7 @@ function test()
|
||||
printBugNumber(BUGNUMBER);
|
||||
printStatus (summary);
|
||||
|
||||
expect = 'ReferenceError: setter is not defined';
|
||||
expect = "ReferenceError: setter is not defined, did you mean 'stop'?";
|
||||
try
|
||||
{
|
||||
eval("setter/*\n*/;");
|
||||
|
@ -742,7 +742,7 @@ add_test(function test_exception_in_onProgress() {
|
||||
it.does.not.exist();
|
||||
};
|
||||
request.get(function onComplete(error) {
|
||||
do_check_eq(error, "ReferenceError: it is not defined");
|
||||
do_check_true(error.toString().contains("ReferenceError: it is not defined"));
|
||||
do_check_eq(this.status, this.ABORTED);
|
||||
|
||||
server.stop(run_next_test);
|
||||
|
Loading…
Reference in New Issue
Block a user