Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(revision 8936)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(revision 8937)
@@ -11,4 +11,5 @@
 import java.util.Arrays;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.LinkedList;
@@ -266,7 +267,12 @@
             }
         }
-        if (Main.isDebugEnabled()) {
+        if (Main.isDebugEnabled() || !source.getErrors().isEmpty()) {
             final long elapsedTime = System.currentTimeMillis() - startTime;
-            Main.debug("Initializing map style " + source.url + " completed in " + Utils.getDurationString(elapsedTime));
+            String message = "Initializing map style " + source.url + " completed in " + Utils.getDurationString(elapsedTime);
+            if (!source.getErrors().isEmpty()) {
+                Main.warn(message + " (" + source.getErrors().size() + " errors)");
+            } else {
+                Main.debug(message);
+            }
         }
     }
@@ -433,5 +439,10 @@
     }
 
-    public static void addStyle(SourceEntry entry) {
+    /**
+     * Add a new map paint style.
+     * @param entry map paint style
+     * @return list of errors that occured during loading
+     */
+    public static Collection<Throwable> addStyle(SourceEntry entry) {
         StyleSource source = fromSourceEntry(entry);
         if (source != null) {
@@ -441,6 +452,10 @@
             fireMapPaintSylesUpdated();
             styles.clearCached();
-            Main.map.mapView.repaint();
-        }
+            if (Main.isDisplayingMapView()) {
+                Main.map.mapView.repaint();
+            }
+            return source.getErrors();
+        }
+        return Collections.emptyList();
     }
 
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java	(revision 8936)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java	(revision 8937)
@@ -83,4 +83,7 @@
     public static final String OPTIONAL_TOOLTIP_TEXT = "Optional tooltip text";
 
+    /** Prefix of preset icon loading failure error message */
+    public static final String PRESET_ICON_ERROR_MSG_PREFIX = "Could not get presets icon ";
+
     public TaggingPresetMenu group;
     public String name;
@@ -166,4 +169,5 @@
      * Called from the XML parser to set the icon.
      * The loading task is performed in the background in order to speedup startup.
+     * @param iconName icon name
      */
     public void setIcon(final String iconName) {
@@ -190,5 +194,5 @@
                     });
                 } else {
-                    Main.warn("Could not get presets icon " + iconName);
+                    Main.warn(PRESET_ICON_ERROR_MSG_PREFIX + iconName);
                 }
             }
Index: /trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTest.java	(revision 8937)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTest.java	(revision 8937)
@@ -0,0 +1,50 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.preferences.map;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
+import org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.ParseException;
+import org.openstreetmap.josm.gui.preferences.SourceEditor.ExtendedSourceEntry;
+
+/**
+ * Unit tests of {@link MapPaintPreference} class.
+ */
+public class MapPaintPreferenceTest {
+
+    /**
+     * Setup test.
+     */
+    @BeforeClass
+    public static void setUpBeforeClass() {
+        JOSMFixture.createUnitTestFixture().init();
+    }
+
+    /**
+     * Test that available map paint styles are valid.
+     * @throws IOException if any I/O error occurs
+     * @throws ParseException if the config file does not match MapCSS syntax
+     */
+    @Test
+    public void testValidityOfAvailableStyles() throws ParseException, IOException {
+        Collection<ExtendedSourceEntry> sources = new MapPaintPreference.MapPaintSourceEditor()
+                .loadAndGetAvailableSources();
+        assertFalse(sources.isEmpty());
+        Collection<Throwable> allErrors = new ArrayList<>();
+        for (ExtendedSourceEntry source : sources) {
+            System.out.print(source.url);
+            Collection<Throwable> errors = MapPaintStyles.addStyle(source);
+            System.out.println(errors.isEmpty() ? " => OK" : " => KO");
+            allErrors.addAll(errors);
+        }
+        assertTrue(allErrors.isEmpty());
+    }
+}
Index: /trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTest.java	(revision 8937)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTest.java	(revision 8937)
@@ -0,0 +1,66 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.preferences.map;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.gui.preferences.SourceEditor.ExtendedSourceEntry;
+import org.openstreetmap.josm.gui.tagging.presets.TaggingPreset;
+import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetReader;
+import org.xml.sax.SAXException;
+
+/**
+ * Unit tests of {@link TaggingPresetPreference} class.
+ */
+public class TaggingPresetPreferenceTest {
+
+    /**
+     * Setup test.
+     */
+    @BeforeClass
+    public static void setUpBeforeClass() {
+        JOSMFixture.createUnitTestFixture().init();
+    }
+
+    /**
+     * Test that available tagging presets are valid.
+     */
+    @Test
+    public void testValidityOfAvailablePresets() {
+        Collection<ExtendedSourceEntry> sources = new TaggingPresetPreference.TaggingPresetSourceEditor()
+                .loadAndGetAvailableSources();
+        assertFalse(sources.isEmpty());
+        Collection<Throwable> allErrors = new ArrayList<>();
+        Set<String> allMessages = new HashSet<>();
+        for (ExtendedSourceEntry source : sources) {
+            System.out.print(source.url);
+            try {
+                Collection<TaggingPreset> presets = TaggingPresetReader.readAll(source.url, true);
+                assertFalse(presets.isEmpty());
+                System.out.println(" => OK");
+                allMessages.addAll(Main.getLastErrorAndWarnings());
+            } catch (SAXException | IOException e) {
+                e.printStackTrace();
+                allErrors.add(e);
+                System.out.println(" => KO");
+            }
+        }
+        assertTrue(allErrors.isEmpty());
+        for (String message : allMessages) {
+            if (message.contains(TaggingPreset.PRESET_ICON_ERROR_MSG_PREFIX)) {
+                fail(message);
+            }
+        }
+    }
+}
Index: /trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorTagCheckerRulesPreferenceTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorTagCheckerRulesPreferenceTest.java	(revision 8936)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorTagCheckerRulesPreferenceTest.java	(revision 8937)
@@ -6,4 +6,5 @@
 
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.Collection;
 
@@ -35,8 +36,9 @@
      */
     @Test
-    public void testValidityOfAvailableSources() throws ParseException, IOException {
+    public void testValidityOfAvailableRules() throws ParseException, IOException {
         Collection<ExtendedSourceEntry> sources = new ValidatorTagCheckerRulesPreference.TagCheckerRulesSourceEditor()
                 .loadAndGetAvailableSources();
         assertFalse(sources.isEmpty());
+        Collection<Throwable> allErrors = new ArrayList<>();
         MapCSSTagChecker tagChecker = new MapCSSTagChecker();
         for (ExtendedSourceEntry source : sources) {
@@ -44,7 +46,8 @@
             ParseResult result = tagChecker.addMapCSS(source.url);
             assertFalse(result.parseChecks.isEmpty());
-            assertTrue(result.parseErrors.isEmpty());
-            System.out.println(" => OK");
+            System.out.println(result.parseErrors.isEmpty() ? " => OK" : " => KO");
+            allErrors.addAll(result.parseErrors);
         }
+        assertTrue(allErrors.isEmpty());
     }
 }
