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

Side by Side Diff: chrome/browser/extensions/api/serial/serial_apitest.cc

Issue 10852016: Move serial out of experimental. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/api_resource_event_notifier.h" 10 #include "chrome/browser/extensions/api/api_resource_event_notifier.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // on the virtual serial port at 57600 bps. An example is at 165 // on the virtual serial port at 57600 bps. An example is at
166 // chrome/test/data/extensions/api_test/serial/api/serial_arduino_test.ino. 166 // chrome/test/data/extensions/api_test/serial/api/serial_arduino_test.ino.
167 // 167 //
168 #define SIMULATE_SERIAL_PORTS (1) 168 #define SIMULATE_SERIAL_PORTS (1)
169 IN_PROC_BROWSER_TEST_F(SerialApiTest, SerialFakeHardware) { 169 IN_PROC_BROWSER_TEST_F(SerialApiTest, SerialFakeHardware) {
170 ResultCatcher catcher; 170 ResultCatcher catcher;
171 catcher.RestrictToProfile(browser()->profile()); 171 catcher.RestrictToProfile(browser()->profile());
172 172
173 #if SIMULATE_SERIAL_PORTS 173 #if SIMULATE_SERIAL_PORTS
174 ASSERT_TRUE(ExtensionFunctionDispatcher::OverrideFunction( 174 ASSERT_TRUE(ExtensionFunctionDispatcher::OverrideFunction(
175 "experimental.serial.getPorts", 175 "serial.getPorts",
176 FakeSerialGetPortsFunctionFactory)); 176 FakeSerialGetPortsFunctionFactory));
177 ASSERT_TRUE(ExtensionFunctionDispatcher::OverrideFunction( 177 ASSERT_TRUE(ExtensionFunctionDispatcher::OverrideFunction(
178 "experimental.serial.open", 178 "serial.open",
179 FakeSerialOpenFunctionFactory)); 179 FakeSerialOpenFunctionFactory));
180 #endif 180 #endif
181 181
182 ASSERT_TRUE(RunExtensionTest("serial/api")) << message_; 182 ASSERT_TRUE(RunExtensionTest("serial/api")) << message_;
183 } 183 }
184 184
185 IN_PROC_BROWSER_TEST_F(SerialApiTest, SerialRealHardware) { 185 IN_PROC_BROWSER_TEST_F(SerialApiTest, SerialRealHardware) {
186 ResultCatcher catcher; 186 ResultCatcher catcher;
187 catcher.RestrictToProfile(browser()->profile()); 187 catcher.RestrictToProfile(browser()->profile());
188 188
189 ASSERT_TRUE(RunExtensionTest("serial/real_hardware")) << message_; 189 ASSERT_TRUE(RunExtensionTest("serial/real_hardware")) << message_;
190 } 190 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698