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/files/scoped_temp_dir.h" | 6 #include "base/files/scoped_temp_dir.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/test/sequenced_worker_pool_owner.h" | 8 #include "base/test/sequenced_worker_pool_owner.h" |
9 #include "content/browser/media/webrtc_identity_store.h" | 9 #include "content/browser/media/webrtc_identity_store.h" |
10 #include "content/public/test/test_browser_thread_bundle.h" | 10 #include "content/public/test/test_browser_thread_bundle.h" |
11 #include "content/public/test/test_utils.h" | 11 #include "content/public/test/test_utils.h" |
12 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
13 #include "sql/connection.h" | 13 #include "sql/connection.h" |
14 #include "sql/test/test_helpers.h" | 14 #include "sql/test/test_helpers.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 #include "url/gurl.h" | 16 #include "url/gurl.h" |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 | 19 |
20 static const char* kFakeOrigin = "http://foo.com"; | 20 static const char kFakeOrigin[] = "http://foo.com"; |
21 static const char* kFakeIdentityName1 = "name1"; | 21 static const char kFakeIdentityName1[] = "name1"; |
22 static const char* kFakeIdentityName2 = "name2"; | 22 static const char kFakeIdentityName2[] = "name2"; |
23 static const char* kFakeCommonName1 = "cname1"; | 23 static const char kFakeCommonName1[] = "cname1"; |
24 static const char* kFakeCommonName2 = "cname2"; | 24 static const char kFakeCommonName2[] = "cname2"; |
25 | 25 |
26 static void OnRequestCompleted(bool* completed, | 26 static void OnRequestCompleted(bool* completed, |
27 std::string* out_cert, | 27 std::string* out_cert, |
28 std::string* out_key, | 28 std::string* out_key, |
29 int error, | 29 int error, |
30 const std::string& certificate, | 30 const std::string& certificate, |
31 const std::string& private_key) { | 31 const std::string& private_key) { |
32 ASSERT_EQ(net::OK, error); | 32 ASSERT_EQ(net::OK, error); |
33 ASSERT_NE("", certificate); | 33 ASSERT_NE("", certificate); |
34 ASSERT_NE("", private_key); | 34 ASSERT_NE("", private_key); |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 webrtc_identity_store_ = NULL; | 370 webrtc_identity_store_ = NULL; |
371 RunUntilIdle(); | 371 RunUntilIdle(); |
372 | 372 |
373 // Verifies the corrupted table was razed. | 373 // Verifies the corrupted table was razed. |
374 scoped_ptr<sql::Connection> db(new sql::Connection()); | 374 scoped_ptr<sql::Connection> db(new sql::Connection()); |
375 EXPECT_TRUE(db->Open(db_path)); | 375 EXPECT_TRUE(db->Open(db_path)); |
376 EXPECT_EQ(0U, sql::test::CountSQLTables(db.get())); | 376 EXPECT_EQ(0U, sql::test::CountSQLTables(db.get())); |
377 } | 377 } |
378 | 378 |
379 } // namespace content | 379 } // namespace content |
OLD | NEW |