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

Side by Side Diff: extensions/browser/api/bluetooth_socket/bluetooth_socket_apitest.cc

Issue 2180373006: Disable BluetoothSocketApiTest.Connect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <memory> 5 #include <memory>
6 #include <string> 6 #include <string>
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "device/bluetooth/bluetooth_adapter_factory.h" 10 #include "device/bluetooth/bluetooth_adapter_factory.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } 90 }
91 91
92 ACTION_TEMPLATE(InvokeCallbackArgument, 92 ACTION_TEMPLATE(InvokeCallbackArgument,
93 HAS_1_TEMPLATE_PARAMS(int, k), 93 HAS_1_TEMPLATE_PARAMS(int, k),
94 AND_2_VALUE_PARAMS(p0, p1)) { 94 AND_2_VALUE_PARAMS(p0, p1)) {
95 ::std::tr1::get<k>(args).Run(p0, p1); 95 ::std::tr1::get<k>(args).Run(p0, p1);
96 } 96 }
97 97
98 } // namespace 98 } // namespace
99 99
100 IN_PROC_BROWSER_TEST_F(BluetoothSocketApiTest, Connect) { 100 // TODO(crbug.com/632002): Flaky on many trybot platforms.
101 IN_PROC_BROWSER_TEST_F(BluetoothSocketApiTest, DISABLED_Connect) {
101 ResultCatcher catcher; 102 ResultCatcher catcher;
102 catcher.RestrictToBrowserContext(browser_context()); 103 catcher.RestrictToBrowserContext(browser_context());
103 104
104 // Return the right mock device object for the address used by the test, 105 // Return the right mock device object for the address used by the test,
105 // return NULL for the "Device not found" test. 106 // return NULL for the "Device not found" test.
106 EXPECT_CALL(*mock_adapter_, GetDevice(mock_device1_->GetAddress())) 107 EXPECT_CALL(*mock_adapter_, GetDevice(mock_device1_->GetAddress()))
107 .WillRepeatedly(testing::Return(mock_device1_.get())); 108 .WillRepeatedly(testing::Return(mock_device1_.get()));
108 EXPECT_CALL(*mock_adapter_, GetDevice(std::string("aa:aa:aa:aa:aa:aa"))) 109 EXPECT_CALL(*mock_adapter_, GetDevice(std::string("aa:aa:aa:aa:aa:aa")))
109 .WillOnce(testing::Return(static_cast<BluetoothDevice*>(NULL))); 110 .WillOnce(testing::Return(static_cast<BluetoothDevice*>(NULL)));
110 111
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 ResultCatcher catcher; 209 ResultCatcher catcher;
209 catcher.RestrictToBrowserContext(browser_context()); 210 catcher.RestrictToBrowserContext(browser_context());
210 211
211 // Run the test. 212 // Run the test.
212 scoped_refptr<const Extension> extension( 213 scoped_refptr<const Extension> extension(
213 LoadApp("api_test/bluetooth_socket/permission_denied")); 214 LoadApp("api_test/bluetooth_socket/permission_denied"));
214 ASSERT_TRUE(extension.get()); 215 ASSERT_TRUE(extension.get());
215 216
216 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); 217 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
217 } 218 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698