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

Unified Diff: chrome/browser/chromeos/bluetooth/bluetooth_service_record_dbus_unittest.cc

Issue 10899037: Refactoring bluetooth API code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated the interfaces with class-level comments. Created 8 years, 3 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: chrome/browser/chromeos/bluetooth/bluetooth_service_record_dbus_unittest.cc
diff --git a/chrome/browser/chromeos/bluetooth/bluetooth_service_record_unittest.cc b/chrome/browser/chromeos/bluetooth/bluetooth_service_record_dbus_unittest.cc
similarity index 77%
rename from chrome/browser/chromeos/bluetooth/bluetooth_service_record_unittest.cc
rename to chrome/browser/chromeos/bluetooth/bluetooth_service_record_dbus_unittest.cc
index 11bcd98f1fac7025f8155caab85c541b8da2c1e8..beae1c849714f8f727d4e4dc9e10c92b4d70eee4 100644
--- a/chrome/browser/chromeos/bluetooth/bluetooth_service_record_unittest.cc
+++ b/chrome/browser/chromeos/bluetooth/bluetooth_service_record_dbus_unittest.cc
@@ -7,7 +7,7 @@
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/path_service.h"
-#include "chrome/browser/chromeos/bluetooth/bluetooth_service_record.h"
+#include "chrome/browser/chromeos/bluetooth/bluetooth_service_record_dbus.h"
#include "chrome/common/chrome_paths.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -21,7 +21,7 @@ static const char* kSerialUuid = "00001101-0000-1000-8000-00805f9b34fb";
namespace chromeos {
-class BluetoothServiceRecordTest : public testing::Test {
+class BluetoothServiceRecordDBusTest : public testing::Test {
public:
FilePath GetTestDataFilePath(const char* file) {
FilePath path;
@@ -33,11 +33,11 @@ class BluetoothServiceRecordTest : public testing::Test {
}
};
-TEST_F(BluetoothServiceRecordTest, RfcommService) {
+TEST_F(BluetoothServiceRecordDBusTest, RfcommService) {
std::string xml_data;
file_util::ReadFileToString(GetTestDataFilePath("rfcomm.xml"), &xml_data);
- BluetoothServiceRecord service_record(kAddress, xml_data);
+ BluetoothServiceRecordDBus service_record(kAddress, xml_data);
EXPECT_EQ(kAddress, service_record.address());
EXPECT_EQ("Headset Audio Gateway", service_record.name());
EXPECT_TRUE(service_record.SupportsRfcomm());
@@ -45,30 +45,30 @@ TEST_F(BluetoothServiceRecordTest, RfcommService) {
EXPECT_EQ(kCustomUuid, service_record.uuid());
}
-TEST_F(BluetoothServiceRecordTest, ShortUuid) {
+TEST_F(BluetoothServiceRecordDBusTest, ShortUuid) {
std::string xml_data;
file_util::ReadFileToString(GetTestDataFilePath("short_uuid.xml"), &xml_data);
- BluetoothServiceRecord short_uuid_service_record(kAddress, xml_data);
+ BluetoothServiceRecordDBus 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);
+ BluetoothServiceRecordDBus medium_uuid_service_record(kAddress, xml_data);
EXPECT_EQ(kSerialUuid, medium_uuid_service_record.uuid());
}
-TEST_F(BluetoothServiceRecordTest, CleanUuid) {
+TEST_F(BluetoothServiceRecordDBusTest, CleanUuid) {
std::string xml_data;
file_util::ReadFileToString(GetTestDataFilePath("uppercase_uuid.xml"),
&xml_data);
- BluetoothServiceRecord service_record(kAddress, xml_data);
+ BluetoothServiceRecordDBus 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);
+ BluetoothServiceRecordDBus invalid_service_record(kAddress, xml_data);
EXPECT_EQ("", invalid_service_record.uuid());
}

Powered by Google App Engine
This is Rietveld 408576698