summaryrefslogtreecommitdiffstats
path: root/extensions/renderer/api
diff options
context:
space:
mode:
authorsammc <sammc@chromium.org>2014-10-28 04:51:04 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-28 11:51:47 +0000
commitfb8875c804337e452e7f799bc3960b912100e5a9 (patch)
tree193fcf3358fb5ccc7885ce4f0a60c7cde190aa7b /extensions/renderer/api
parent929d45a9ff9a74eb05453a10b84ba1a27392c1e6 (diff)
downloadchromium_src-fb8875c804337e452e7f799bc3960b912100e5a9.zip
chromium_src-fb8875c804337e452e7f799bc3960b912100e5a9.tar.gz
chromium_src-fb8875c804337e452e7f799bc3960b912100e5a9.tar.bz2
Enable the mojo-based serial API in the renderer behind a flag.
This enables the serial custom bindings that forward to the mojo serial service behind the --enable-mojo-serial-service flag. This adds service factory overrides to ServiceRegistrationManager for testing and updates the serial api browsertest to test both serial implementations. BUG=389016 Review URL: https://codereview.chromium.org/652313002 Cr-Commit-Position: refs/heads/master@{#301594}
Diffstat (limited to 'extensions/renderer/api')
-rw-r--r--extensions/renderer/api/serial/data_receiver_unittest.cc6
-rw-r--r--extensions/renderer/api/serial/data_sender_unittest.cc6
-rw-r--r--extensions/renderer/api/serial/serial_api_unittest.cc11
3 files changed, 0 insertions, 23 deletions
diff --git a/extensions/renderer/api/serial/data_receiver_unittest.cc b/extensions/renderer/api/serial/data_receiver_unittest.cc
index 7e6df3b..f699d02 100644
--- a/extensions/renderer/api/serial/data_receiver_unittest.cc
+++ b/extensions/renderer/api/serial/data_receiver_unittest.cc
@@ -18,12 +18,6 @@ class DataReceiverTest : public ApiTestBase {
void SetUp() override {
ApiTestBase::SetUp();
- env()->RegisterModule("async_waiter", IDR_ASYNC_WAITER_JS);
- env()->RegisterModule("data_receiver", IDR_DATA_RECEIVER_JS);
- env()->RegisterModule("device/serial/data_stream.mojom",
- IDR_DATA_STREAM_MOJOM_JS);
- env()->RegisterModule("device/serial/data_stream_serialization.mojom",
- IDR_DATA_STREAM_SERIALIZATION_MOJOM_JS);
service_provider()->AddService(base::Bind(
&DataReceiverTest::CreateDataSource, base::Unretained(this)));
}
diff --git a/extensions/renderer/api/serial/data_sender_unittest.cc b/extensions/renderer/api/serial/data_sender_unittest.cc
index eac7e41c..e6a13af 100644
--- a/extensions/renderer/api/serial/data_sender_unittest.cc
+++ b/extensions/renderer/api/serial/data_sender_unittest.cc
@@ -18,12 +18,6 @@ class DataSenderTest : public ApiTestBase {
void SetUp() override {
ApiTestBase::SetUp();
- env()->RegisterModule("async_waiter", IDR_ASYNC_WAITER_JS);
- env()->RegisterModule("data_sender", IDR_DATA_SENDER_JS);
- env()->RegisterModule("device/serial/data_stream.mojom",
- IDR_DATA_STREAM_MOJOM_JS);
- env()->RegisterModule("device/serial/data_stream_serialization.mojom",
- IDR_DATA_STREAM_SERIALIZATION_MOJOM_JS);
service_provider()->AddService(
base::Bind(&DataSenderTest::CreateDataSink, base::Unretained(this)));
}
diff --git a/extensions/renderer/api/serial/serial_api_unittest.cc b/extensions/renderer/api/serial/serial_api_unittest.cc
index a01c69f..36cbe45 100644
--- a/extensions/renderer/api/serial/serial_api_unittest.cc
+++ b/extensions/renderer/api/serial/serial_api_unittest.cc
@@ -397,18 +397,7 @@ class SerialApiTest : public ApiTestBase {
void SetUp() override {
ApiTestBase::SetUp();
- env()->RegisterModule("async_waiter", IDR_ASYNC_WAITER_JS);
- env()->RegisterModule("data_receiver", IDR_DATA_RECEIVER_JS);
- env()->RegisterModule("data_sender", IDR_DATA_SENDER_JS);
env()->RegisterModule("serial", IDR_SERIAL_CUSTOM_BINDINGS_JS);
- env()->RegisterModule("serial_service", IDR_SERIAL_SERVICE_JS);
- env()->RegisterModule("device/serial/data_stream.mojom",
- IDR_DATA_STREAM_MOJOM_JS);
- env()->RegisterModule("device/serial/data_stream_serialization.mojom",
- IDR_DATA_STREAM_SERIALIZATION_MOJOM_JS);
- env()->RegisterModule("device/serial/serial.mojom", IDR_SERIAL_MOJOM_JS);
- env()->RegisterModule("device/serial/serial_serialization.mojom",
- IDR_SERIAL_SERIALIZATION_MOJOM_JS);
service_provider()->AddService<device::serial::SerialService>(base::Bind(
&SerialApiTest::CreateSerialService, base::Unretained(this)));
service_provider()->IgnoreServiceRequests<KeepAlive>();