Componentize TestToolbarModel

This will be needed by upcoming CL that componentizes omnibox_edit_unittest.cc.

TBR=jochen

Review URL: https://codereview.chromium.org/1634743003

Cr-Commit-Position: refs/heads/master@{#372097}
diff --git a/components/toolbar.gypi b/components/toolbar.gypi
index 4a94c60..a690d696 100644
--- a/components/toolbar.gypi
+++ b/components/toolbar.gypi
@@ -22,5 +22,31 @@
         'toolbar/toolbar_model.h',
       ],
     },
+    {
+      # GN version: //components/toolbar:test_support
+      'target_name': 'toolbar_test_support',
+      'type': 'static_library',
+      'dependencies': [
+        '../base/base.gyp:base',
+        '../ui/gfx/gfx.gyp:gfx_vector_icons',
+        'components_resources.gyp:components_resources',
+        'toolbar',
+      ],
+      'include_dirs': [
+        '..',
+      ],
+      'sources': [
+        'toolbar/test_toolbar_model.cc',
+        'toolbar/test_toolbar_model.h',
+      ],
+      'conditions': [
+        ['toolkit_views==1', {
+          # Needed to get the TOOLKIT_VIEWS define.
+          'dependencies': [
+            '<(DEPTH)/ui/views/views.gyp:views',
+          ],
+        }],
+      ],
+    },
   ],
 }