OLD | NEW |
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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
12 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
13 #include "base/test/thread_test_helper.h" | 13 #include "base/test/thread_test_helper.h" |
14 #include "chrome/browser/net/clear_on_exit_policy.h" | 14 #include "chrome/browser/net/clear_on_exit_policy.h" |
15 #include "chrome/browser/net/sqlite_server_bound_cert_store.h" | 15 #include "chrome/browser/net/sqlite_server_bound_cert_store.h" |
16 #include "chrome/common/chrome_constants.h" | 16 #include "chrome/common/chrome_constants.h" |
17 #include "content/public/test/test_browser_thread.h" | 17 #include "content/public/test/test_browser_thread.h" |
18 #include "net/base/cert_test_util.h" | |
19 #include "net/base/test_data_directory.h" | 18 #include "net/base/test_data_directory.h" |
| 19 #include "net/test/cert_test_util.h" |
20 #include "sql/statement.h" | 20 #include "sql/statement.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
22 #include "webkit/quota/mock_special_storage_policy.h" | 22 #include "webkit/quota/mock_special_storage_policy.h" |
23 | 23 |
24 using content::BrowserThread; | 24 using content::BrowserThread; |
25 | 25 |
26 class SQLiteServerBoundCertStoreTest : public testing::Test { | 26 class SQLiteServerBoundCertStoreTest : public testing::Test { |
27 public: | 27 public: |
28 SQLiteServerBoundCertStoreTest() | 28 SQLiteServerBoundCertStoreTest() |
29 : db_thread_(BrowserThread::DB), | 29 : db_thread_(BrowserThread::DB), |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 sql::Connection db; | 425 sql::Connection db; |
426 ASSERT_TRUE(db.Open(v3_db_path)); | 426 ASSERT_TRUE(db.Open(v3_db_path)); |
427 sql::Statement smt(db.GetUniqueStatement( | 427 sql::Statement smt(db.GetUniqueStatement( |
428 "SELECT value FROM meta WHERE key = \"version\"")); | 428 "SELECT value FROM meta WHERE key = \"version\"")); |
429 ASSERT_TRUE(smt.Step()); | 429 ASSERT_TRUE(smt.Step()); |
430 EXPECT_EQ(4, smt.ColumnInt(0)); | 430 EXPECT_EQ(4, smt.ColumnInt(0)); |
431 EXPECT_FALSE(smt.Step()); | 431 EXPECT_FALSE(smt.Step()); |
432 } | 432 } |
433 } | 433 } |
434 } | 434 } |
OLD | NEW |