OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/callback.h" | 5 #include "base/callback.h" |
6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chromeos/dbus/dbus_thread_manager.h" | 10 #include "chromeos/dbus/dbus_thread_manager.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 std::string peer_identifier_; | 135 std::string peer_identifier_; |
136 std::string tag_identifier_; | 136 std::string tag_identifier_; |
137 scoped_refptr<NfcAdapter> adapter_; | 137 scoped_refptr<NfcAdapter> adapter_; |
138 }; | 138 }; |
139 | 139 |
140 } // namespace | 140 } // namespace |
141 | 141 |
142 class NfcChromeOSTest : public testing::Test { | 142 class NfcChromeOSTest : public testing::Test { |
143 public: | 143 public: |
144 virtual void SetUp() { | 144 virtual void SetUp() { |
145 DBusThreadManager::InitializeWithStub(); | 145 DBusThreadManager::Initialize(); |
146 fake_nfc_adapter_client_ = static_cast<FakeNfcAdapterClient*>( | 146 fake_nfc_adapter_client_ = static_cast<FakeNfcAdapterClient*>( |
147 DBusThreadManager::Get()->GetNfcAdapterClient()); | 147 DBusThreadManager::Get()->GetNfcAdapterClient()); |
148 fake_nfc_device_client_ = static_cast<FakeNfcDeviceClient*>( | 148 fake_nfc_device_client_ = static_cast<FakeNfcDeviceClient*>( |
149 DBusThreadManager::Get()->GetNfcDeviceClient()); | 149 DBusThreadManager::Get()->GetNfcDeviceClient()); |
150 fake_nfc_record_client_ = static_cast<FakeNfcRecordClient*>( | 150 fake_nfc_record_client_ = static_cast<FakeNfcRecordClient*>( |
151 DBusThreadManager::Get()->GetNfcRecordClient()); | 151 DBusThreadManager::Get()->GetNfcRecordClient()); |
152 fake_nfc_tag_client_ = static_cast<FakeNfcTagClient*>( | 152 fake_nfc_tag_client_ = static_cast<FakeNfcTagClient*>( |
153 DBusThreadManager::Get()->GetNfcTagClient()); | 153 DBusThreadManager::Get()->GetNfcTagClient()); |
154 | 154 |
155 fake_nfc_adapter_client_->EnablePairingOnPoll(false); | 155 fake_nfc_adapter_client_->EnablePairingOnPoll(false); |
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
854 EXPECT_TRUE(title->GetString(NfcNdefRecord::kFieldText, &string_value)); | 854 EXPECT_TRUE(title->GetString(NfcNdefRecord::kFieldText, &string_value)); |
855 EXPECT_EQ(kText, string_value); | 855 EXPECT_EQ(kText, string_value); |
856 EXPECT_TRUE(title->GetString( | 856 EXPECT_TRUE(title->GetString( |
857 NfcNdefRecord::kFieldLanguageCode, &string_value)); | 857 NfcNdefRecord::kFieldLanguageCode, &string_value)); |
858 EXPECT_EQ(kLanguageCode, string_value); | 858 EXPECT_EQ(kLanguageCode, string_value); |
859 EXPECT_TRUE(title->GetString(NfcNdefRecord::kFieldEncoding, &string_value)); | 859 EXPECT_TRUE(title->GetString(NfcNdefRecord::kFieldEncoding, &string_value)); |
860 EXPECT_EQ(kEncoding, string_value); | 860 EXPECT_EQ(kEncoding, string_value); |
861 } | 861 } |
862 | 862 |
863 } // namespace chromeos | 863 } // namespace chromeos |
OLD | NEW |