| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "base/test/sequenced_worker_pool_owner.h" | 7 #include "base/test/sequenced_worker_pool_owner.h" |
| 8 #include "content/browser/media/webrtc_identity_store.h" | 8 #include "content/browser/media/webrtc_identity_store.h" |
| 9 #include "content/public/test/test_browser_thread_bundle.h" | 9 #include "content/public/test/test_browser_thread_bundle.h" |
| 10 #include "content/public/test/test_utils.h" | 10 #include "content/public/test/test_utils.h" |
| 11 #include "googleurl/src/gurl.h" | |
| 12 #include "net/base/net_errors.h" | 11 #include "net/base/net_errors.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 #include "url/gurl.h" |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 | 16 |
| 17 // TODO(jiayl): the tests fail on Android since the openssl version of | 17 // TODO(jiayl): the tests fail on Android since the openssl version of |
| 18 // CreateSelfSignedCert is not implemented. We should mock out this dependency | 18 // CreateSelfSignedCert is not implemented. We should mock out this dependency |
| 19 // and remove the if-defined. | 19 // and remove the if-defined. |
| 20 | 20 |
| 21 #if !defined(OS_ANDROID) | 21 #if !defined(OS_ANDROID) |
| 22 class WebRTCIdentityStoreTest : public testing::Test { | 22 class WebRTCIdentityStoreTest : public testing::Test { |
| 23 public: | 23 public: |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 base::Bind(&OnRequestCompleted, &completed_2)); | 97 base::Bind(&OnRequestCompleted, &completed_2)); |
| 98 ASSERT_FALSE(cancel_callback_2.is_null()); | 98 ASSERT_FALSE(cancel_callback_2.is_null()); |
| 99 | 99 |
| 100 pool_owner_->pool()->FlushForTesting(); | 100 pool_owner_->pool()->FlushForTesting(); |
| 101 base::RunLoop().RunUntilIdle(); | 101 base::RunLoop().RunUntilIdle(); |
| 102 EXPECT_TRUE(completed_1); | 102 EXPECT_TRUE(completed_1); |
| 103 EXPECT_TRUE(completed_2); | 103 EXPECT_TRUE(completed_2); |
| 104 } | 104 } |
| 105 #endif | 105 #endif |
| 106 } // namespace content | 106 } // namespace content |
| OLD | NEW |