OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "chrome/browser/usb/usb_chooser_context.h" | 7 #include "chrome/browser/usb/usb_chooser_context.h" |
8 #include "chrome/browser/usb/usb_chooser_context_factory.h" | 8 #include "chrome/browser/usb/usb_chooser_context_factory.h" |
9 #include "chrome/test/base/testing_profile.h" | 9 #include "chrome/test/base/testing_profile.h" |
10 #include "content/public/test/test_browser_thread_bundle.h" | 10 #include "content/public/test/test_browser_thread_bundle.h" |
11 #include "device/core/mock_device_client.h" | 11 #include "device/base/mock_device_client.h" |
12 #include "device/usb/mock_usb_device.h" | 12 #include "device/usb/mock_usb_device.h" |
13 #include "device/usb/mock_usb_service.h" | 13 #include "device/usb/mock_usb_service.h" |
14 | 14 |
15 using device::MockUsbDevice; | 15 using device::MockUsbDevice; |
16 using device::UsbDevice; | 16 using device::UsbDevice; |
17 | 17 |
18 class UsbChooserContextTest : public testing::Test { | 18 class UsbChooserContextTest : public testing::Test { |
19 public: | 19 public: |
20 UsbChooserContextTest() {} | 20 UsbChooserContextTest() {} |
21 ~UsbChooserContextTest() override {} | 21 ~UsbChooserContextTest() override {} |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 { | 206 { |
207 std::vector<std::unique_ptr<base::DictionaryValue>> objects = | 207 std::vector<std::unique_ptr<base::DictionaryValue>> objects = |
208 incognito_store->GetGrantedObjects(origin, origin); | 208 incognito_store->GetGrantedObjects(origin, origin); |
209 EXPECT_EQ(1u, objects.size()); | 209 EXPECT_EQ(1u, objects.size()); |
210 std::vector<std::unique_ptr<ChooserContextBase::Object>> | 210 std::vector<std::unique_ptr<ChooserContextBase::Object>> |
211 all_origin_objects = incognito_store->GetAllGrantedObjects(); | 211 all_origin_objects = incognito_store->GetAllGrantedObjects(); |
212 ASSERT_EQ(1u, all_origin_objects.size()); | 212 ASSERT_EQ(1u, all_origin_objects.size()); |
213 EXPECT_TRUE(all_origin_objects[0]->incognito); | 213 EXPECT_TRUE(all_origin_objects[0]->incognito); |
214 } | 214 } |
215 } | 215 } |
OLD | NEW |