Test default TaskQueue implementation via TaskQueueBase interface

Bug: webrtc:10191
Change-Id: I97a73311790e8ceac00d5575dd124ad8ad76503f
Reviewed-on: https://webrtc-review.googlesource.com/c/124400
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26853}
diff --git a/api/BUILD.gn b/api/BUILD.gn
index ed3c708..32f4c8e 100644
--- a/api/BUILD.gn
+++ b/api/BUILD.gn
@@ -681,6 +681,7 @@
       "../rtc_base:gunit_helpers",
       "../rtc_base:rtc_base_approved",
       "../test:test_support",
+      "task_queue:task_queue_default_factory_unittests",
       "units:units_unittests",
     ]
   }
diff --git a/api/task_queue/BUILD.gn b/api/task_queue/BUILD.gn
index 578a212..e7e3aec 100644
--- a/api/task_queue/BUILD.gn
+++ b/api/task_queue/BUILD.gn
@@ -60,9 +60,7 @@
 }
 
 rtc_source_set("default_task_queue_factory") {
-  # TODO(bugs.webrtc.org/10191): Make public when implemented for all
-  # supported platforms.
-  visibility = [ ":global_task_queue_factory" ]
+  visibility = [ "*" ]
   sources = [
     "default_task_queue_factory.h",
   ]
@@ -112,6 +110,20 @@
   }
 }
 
+if (rtc_include_tests) {
+  rtc_source_set("task_queue_default_factory_unittests") {
+    testonly = true
+    sources = [
+      "default_task_queue_factory_unittest.cc",
+    ]
+    deps = [
+      ":default_task_queue_factory",
+      ":task_queue_test",
+      "../../test:test_support",
+    ]
+  }
+}
+
 # Linking with global_task_queue_factory adds link-time implementation of the
 # rtc::TaskQueue that allows run-time injection of the TaskQueue implementaion.
 rtc_source_set("global_task_queue_factory") {
diff --git a/api/task_queue/default_task_queue_factory_unittest.cc b/api/task_queue/default_task_queue_factory_unittest.cc
new file mode 100644
index 0000000..92c17d8
--- /dev/null
+++ b/api/task_queue/default_task_queue_factory_unittest.cc
@@ -0,0 +1,24 @@
+/*
+ *  Copyright 2019 The WebRTC Project Authors. All rights reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "api/task_queue/default_task_queue_factory.h"
+
+#include "api/task_queue/task_queue_test.h"
+#include "test/gtest.h"
+
+namespace webrtc {
+namespace {
+
+INSTANTIATE_TEST_SUITE_P(Default,
+                         TaskQueueTest,
+                         ::testing::Values(CreateDefaultTaskQueueFactory));
+
+}  // namespace
+}  // namespace webrtc