mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
Bug 1517411 - Add test cases for globalThis in js-property-provider test. r=Honza.
Differential Revision: https://phabricator.services.mozilla.com/D45632 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
3d0ae40f28
commit
90cc5901b8
@ -132,6 +132,33 @@ function runChecks(dbgObject, environment, sandbox) {
|
||||
test_has_no_results(results);
|
||||
}
|
||||
|
||||
info("Test that suggestions are given for 'globalThis'");
|
||||
results = propertyProvider("g");
|
||||
test_has_result(results, "globalThis");
|
||||
|
||||
info("Test that suggestions are given for 'globalThis.'");
|
||||
results = propertyProvider("globalThis.");
|
||||
test_has_result(results, "testObject");
|
||||
|
||||
info("Test that suggestions are given for '(globalThis).'");
|
||||
results = propertyProvider("(globalThis).");
|
||||
test_has_result(results, "testObject");
|
||||
|
||||
info(
|
||||
"Test that suggestions are given for deep 'globalThis' properties access"
|
||||
);
|
||||
results = propertyProvider("(globalThis).testObject.propA.");
|
||||
test_has_result(results, "shift");
|
||||
|
||||
results = propertyProvider("(globalThis).testObject.propA[");
|
||||
test_has_result(results, `"shift"`);
|
||||
|
||||
results = propertyProvider("(globalThis)['testObject']['propA'][");
|
||||
test_has_result(results, `"shift"`);
|
||||
|
||||
results = propertyProvider("(globalThis).testObject['propA'].");
|
||||
test_has_result(results, "shift");
|
||||
|
||||
info("Testing lexical scope issues (Bug 1207868)");
|
||||
results = propertyProvider("foobar");
|
||||
test_has_result(results, "foobar");
|
||||
|
Loading…
Reference in New Issue
Block a user