| 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" |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 | 171 |
| 172 #if SIMULATE_SERIAL_PORTS | 172 #if SIMULATE_SERIAL_PORTS |
| 173 ASSERT_TRUE(ExtensionFunctionDispatcher::OverrideFunction( | 173 ASSERT_TRUE(ExtensionFunctionDispatcher::OverrideFunction( |
| 174 "serial.getPorts", | 174 "serial.getPorts", |
| 175 FakeSerialGetPortsFunctionFactory)); | 175 FakeSerialGetPortsFunctionFactory)); |
| 176 ASSERT_TRUE(ExtensionFunctionDispatcher::OverrideFunction( | 176 ASSERT_TRUE(ExtensionFunctionDispatcher::OverrideFunction( |
| 177 "serial.open", | 177 "serial.open", |
| 178 FakeSerialOpenFunctionFactory)); | 178 FakeSerialOpenFunctionFactory)); |
| 179 #endif | 179 #endif |
| 180 | 180 |
| 181 ASSERT_TRUE(RunPlatformAppTest("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(RunPlatformAppTest("serial/real_hardware")) << message_; | 188 ASSERT_TRUE(RunExtensionTest("serial/real_hardware")) << message_; |
| 189 } | 189 } |
| OLD | NEW |