Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / js / xpconnect / tests / unit / test_resistFingerprinting_date_now.js
blob1acd6c586cbfd030ed655147a725ff0b5d721913
1 Services.prefs.setBoolPref("privacy.resistFingerprinting", true);
2 registerCleanupFunction(() => {
3   Services.prefs.clearUserPref("privacy.resistFingerprinting");
4 });
6 add_task(function test_sandbox_rfp() {
7   var sb = Cu.Sandbox('http://example.com');
8   var date = Cu.evalInSandbox('Date.now()', sb);
9   ok(date > 1672553000000, "Date.now() works with resistFingerprinting");
10 });
12 add_task(function test_sandbox_system() {
13   var sb = Cu.Sandbox(Services.scriptSecurityManager.getSystemPrincipal());
14   var date = Cu.evalInSandbox('Date.now()', sb);
15   ok(date > 1672553000000, "Date.now() works with systemprincipal");
16 });