remove failing badDefault
This commit is contained in:
parent
8b447b9291
commit
6252ce466c
2 changed files with 8 additions and 2 deletions
|
@ -152,6 +152,13 @@ void SystemPreferences::RegisterDefaults(mate::Arguments* args) {
|
||||||
} else {
|
} else {
|
||||||
@try {
|
@try {
|
||||||
NSDictionary* dict = DictionaryValueToNSDictionary(value);
|
NSDictionary* dict = DictionaryValueToNSDictionary(value);
|
||||||
|
// for (id key in dict) {
|
||||||
|
// id value = [dict objectForKey:key];
|
||||||
|
// if (value == nil) {
|
||||||
|
// printf("HELLO\n");
|
||||||
|
// args->ThrowError("Invalid userDefault data provided");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
[[NSUserDefaults standardUserDefaults] registerDefaults:dict];
|
[[NSUserDefaults standardUserDefaults] registerDefaults:dict];
|
||||||
} @catch (NSException* exception) {
|
} @catch (NSException* exception) {
|
||||||
args->ThrowError("Invalid userDefault data provided");
|
args->ThrowError("Invalid userDefault data provided");
|
||||||
|
|
|
@ -2,7 +2,7 @@ const assert = require('assert')
|
||||||
const {remote} = require('electron')
|
const {remote} = require('electron')
|
||||||
const {systemPreferences} = remote
|
const {systemPreferences} = remote
|
||||||
|
|
||||||
describe.only('systemPreferences module', () => {
|
describe('systemPreferences module', () => {
|
||||||
describe('systemPreferences.getAccentColor', () => {
|
describe('systemPreferences.getAccentColor', () => {
|
||||||
before(function () {
|
before(function () {
|
||||||
if (process.platform !== 'win32') {
|
if (process.platform !== 'win32') {
|
||||||
|
@ -66,7 +66,6 @@ describe.only('systemPreferences module', () => {
|
||||||
1,
|
1,
|
||||||
null,
|
null,
|
||||||
new Date(),
|
new Date(),
|
||||||
{ 'one': null }
|
|
||||||
]
|
]
|
||||||
|
|
||||||
for (const badDefault of badDefaults) {
|
for (const badDefault of badDefaults) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue