OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <deque> | 5 #include <deque> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "chrome/browser/extensions/api/serial/serial_api.h" | 10 #include "chrome/browser/extensions/api/serial/serial_api.h" |
11 #include "chrome/browser/extensions/api/serial/serial_connection.h" | 11 #include "chrome/browser/extensions/api/serial/serial_connection.h" |
12 #include "chrome/browser/extensions/extension_apitest.h" | 12 #include "chrome/browser/extensions/extension_apitest.h" |
13 #include "chrome/browser/extensions/extension_function.h" | 13 #include "chrome/browser/extensions/extension_function.h" |
14 #include "chrome/browser/extensions/extension_function_test_utils.h" | 14 #include "chrome/browser/extensions/extension_function_test_utils.h" |
15 #include "chrome/browser/extensions/extension_test_message_listener.h" | 15 #include "chrome/browser/extensions/extension_test_message_listener.h" |
16 #include "chrome/browser/ui/browser.h" | 16 #include "chrome/browser/ui/browser.h" |
17 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
18 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
19 | 19 |
20 using testing::_; | 20 using testing::_; |
21 using testing::Return; | 21 using testing::Return; |
22 | 22 |
23 using content::BrowserThread; | 23 using content::BrowserThread; |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 class SerialApiTest : public PlatformAppApiTest { | 27 class SerialApiTest : public ExtensionApiTest { |
28 public: | 28 public: |
29 SerialApiTest() {} | 29 SerialApiTest() {} |
30 }; | 30 }; |
31 | 31 |
32 } // namespace | 32 } // namespace |
33 | 33 |
34 namespace extensions { | 34 namespace extensions { |
35 | 35 |
36 class FakeSerialGetPortsFunction : public AsyncExtensionFunction { | 36 class FakeSerialGetPortsFunction : public AsyncExtensionFunction { |
37 public: | 37 public: |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 | 180 |
181 ASSERT_TRUE(RunExtensionTest("serial/api")) << message_; | 181 ASSERT_TRUE(RunExtensionTest("serial/api")) << message_; |
182 } | 182 } |
183 | 183 |
184 IN_PROC_BROWSER_TEST_F(SerialApiTest, SerialRealHardware) { | 184 IN_PROC_BROWSER_TEST_F(SerialApiTest, SerialRealHardware) { |
185 ResultCatcher catcher; | 185 ResultCatcher catcher; |
186 catcher.RestrictToProfile(browser()->profile()); | 186 catcher.RestrictToProfile(browser()->profile()); |
187 | 187 |
188 ASSERT_TRUE(RunExtensionTest("serial/real_hardware")) << message_; | 188 ASSERT_TRUE(RunExtensionTest("serial/real_hardware")) << message_; |
189 } | 189 } |
OLD | NEW |