Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Unified Diff: device/bluetooth/bluetooth_service_record_chromeos_unittest.cc

Issue 11884027: Separated BluetoothServiceRecord interface from BluetoothServiceRecordChromeOs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: changed namespace from device to chromeos. Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/bluetooth_service_record_chromeos_unittest.cc
diff --git a/device/bluetooth/bluetooth_service_record_unittest.cc b/device/bluetooth/bluetooth_service_record_chromeos_unittest.cc
similarity index 73%
rename from device/bluetooth/bluetooth_service_record_unittest.cc
rename to device/bluetooth/bluetooth_service_record_chromeos_unittest.cc
index b59474f54ae20bd2a1911cb616d975fd7f8b5141..1d45c5d253d3f323934356232bbf9b61325bf73b 100644
--- a/device/bluetooth/bluetooth_service_record_unittest.cc
+++ b/device/bluetooth/bluetooth_service_record_chromeos_unittest.cc
@@ -9,7 +9,7 @@
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/path_service.h"
-#include "device/bluetooth/bluetooth_service_record.h"
+#include "device/bluetooth/bluetooth_service_record_chromeos.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
@@ -20,9 +20,9 @@ static const char* kSerialUuid = "00001101-0000-1000-8000-00805f9b34fb";
} // namespace
-namespace device {
+namespace chromeos {
-class BluetoothServiceRecordTest : public testing::Test {
+class BluetoothServiceRecordChromeOsTest : public testing::Test {
public:
FilePath GetTestDataFilePath(const char* file) {
FilePath path;
@@ -36,11 +36,11 @@ class BluetoothServiceRecordTest : public testing::Test {
}
};
-TEST_F(BluetoothServiceRecordTest, RfcommService) {
+TEST_F(BluetoothServiceRecordChromeOsTest, RfcommService) {
std::string xml_data;
file_util::ReadFileToString(GetTestDataFilePath("rfcomm.xml"), &xml_data);
- BluetoothServiceRecord service_record(kAddress, xml_data);
+ BluetoothServiceRecordChromeOs service_record(kAddress, xml_data);
EXPECT_EQ(kAddress, service_record.address());
EXPECT_EQ("Headset Audio Gateway", service_record.name());
EXPECT_TRUE(service_record.SupportsRfcomm());
@@ -48,31 +48,31 @@ TEST_F(BluetoothServiceRecordTest, RfcommService) {
EXPECT_EQ(kCustomUuid, service_record.uuid());
}
-TEST_F(BluetoothServiceRecordTest, ShortUuid) {
+TEST_F(BluetoothServiceRecordChromeOsTest, ShortUuid) {
std::string xml_data;
file_util::ReadFileToString(GetTestDataFilePath("short_uuid.xml"), &xml_data);
- BluetoothServiceRecord short_uuid_service_record(kAddress, xml_data);
+ BluetoothServiceRecordChromeOs short_uuid_service_record(kAddress, xml_data);
EXPECT_EQ(kSerialUuid, short_uuid_service_record.uuid());
xml_data.clear();
file_util::ReadFileToString(
GetTestDataFilePath("medium_uuid.xml"), &xml_data);
- BluetoothServiceRecord medium_uuid_service_record(kAddress, xml_data);
+ BluetoothServiceRecordChromeOs medium_uuid_service_record(kAddress, xml_data);
EXPECT_EQ(kSerialUuid, medium_uuid_service_record.uuid());
}
-TEST_F(BluetoothServiceRecordTest, CleanUuid) {
+TEST_F(BluetoothServiceRecordChromeOsTest, CleanUuid) {
std::string xml_data;
file_util::ReadFileToString(GetTestDataFilePath("uppercase_uuid.xml"),
&xml_data);
- BluetoothServiceRecord service_record(kAddress, xml_data);
+ BluetoothServiceRecordChromeOs service_record(kAddress, xml_data);
EXPECT_EQ(kCustomUuid, service_record.uuid());
xml_data.clear();
file_util::ReadFileToString(GetTestDataFilePath("invalid_uuid.xml"),
&xml_data);
- BluetoothServiceRecord invalid_service_record(kAddress, xml_data);
+ BluetoothServiceRecordChromeOs invalid_service_record(kAddress, xml_data);
EXPECT_EQ("", invalid_service_record.uuid());
}
-} // namespace device
+} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698