| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ppapi/tests/test_broker.h" | 5 #include "ppapi/tests/test_broker.h" |
| 6 | 6 |
| 7 #if defined(_MSC_VER) | 7 #if defined(_MSC_VER) |
| 8 #define OS_WIN 1 | 8 #define OS_WIN 1 |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 #else | 10 #else |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 } | 195 } |
| 196 | 196 |
| 197 PP_EXPORT void PPP_ShutdownBroker() {} | 197 PP_EXPORT void PPP_ShutdownBroker() {} |
| 198 | 198 |
| 199 TestBroker::TestBroker(TestingInstance* instance) | 199 TestBroker::TestBroker(TestingInstance* instance) |
| 200 : TestCase(instance), | 200 : TestCase(instance), |
| 201 broker_interface_(NULL) { | 201 broker_interface_(NULL) { |
| 202 } | 202 } |
| 203 | 203 |
| 204 bool TestBroker::Init() { | 204 bool TestBroker::Init() { |
| 205 broker_interface_ = static_cast<PPB_BrokerTrusted const*>( | 205 broker_interface_ = static_cast<const PPB_BrokerTrusted*>( |
| 206 pp::Module::Get()->GetBrowserInterface(PPB_BROKER_TRUSTED_INTERFACE)); | 206 pp::Module::Get()->GetBrowserInterface(PPB_BROKER_TRUSTED_INTERFACE)); |
| 207 return !!broker_interface_; | 207 return !!broker_interface_; |
| 208 } | 208 } |
| 209 | 209 |
| 210 void TestBroker::RunTests(const std::string& filter) { | 210 void TestBroker::RunTests(const std::string& filter) { |
| 211 RUN_TEST(Create, filter); | 211 RUN_TEST(Create, filter); |
| 212 RUN_TEST(Create, filter); | 212 RUN_TEST(Create, filter); |
| 213 RUN_TEST(GetHandleFailure, filter); | 213 RUN_TEST(GetHandleFailure, filter); |
| 214 RUN_TEST(ConnectFailure, filter); | 214 RUN_TEST(ConnectFailure, filter); |
| 215 #if !defined(OS_WIN) // This is broken on Windows. See http://crbug.com/103975. | 215 #if !defined(OS_WIN) // This is broken on Windows. See http://crbug.com/103975. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 | 281 |
| 282 PlatformFile file = IntToPlatformFile(handle); | 282 PlatformFile file = IntToPlatformFile(handle); |
| 283 ASSERT_TRUE(VerifyMessage(file, sizeof(kHelloMessage), kHelloMessage)); | 283 ASSERT_TRUE(VerifyMessage(file, sizeof(kHelloMessage), kHelloMessage)); |
| 284 ASSERT_TRUE(VerifyMessage(file, sizeof(kBrokerUnsandboxed), | 284 ASSERT_TRUE(VerifyMessage(file, sizeof(kBrokerUnsandboxed), |
| 285 kBrokerUnsandboxed)); | 285 kBrokerUnsandboxed)); |
| 286 | 286 |
| 287 ASSERT_TRUE(ClosePlatformFile(file)); | 287 ASSERT_TRUE(ClosePlatformFile(file)); |
| 288 | 288 |
| 289 PASS(); | 289 PASS(); |
| 290 } | 290 } |
| OLD | NEW |