| 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/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "base/synchronization/waitable_event.h" | 7 #include "base/synchronization/waitable_event.h" |
| 8 #include "chrome/browser/extensions/activity_log.h" | 8 #include "chrome/browser/extensions/activity_log.h" |
| 9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
| 10 #include "chrome/browser/extensions/test_extension_system.h" | 10 #include "chrome/browser/extensions/test_extension_system.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 // Need to ensure the writes were completed. | 88 // Need to ensure the writes were completed. |
| 89 base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(3)); | 89 base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(3)); |
| 90 FilePath db_file = profile_->GetPath().Append( | 90 FilePath db_file = profile_->GetPath().Append( |
| 91 chrome::kExtensionActivityLogFilename); | 91 chrome::kExtensionActivityLogFilename); |
| 92 sql::Connection db; | 92 sql::Connection db; |
| 93 ASSERT_TRUE(db.Open(db_file)); | 93 ASSERT_TRUE(db.Open(db_file)); |
| 94 std::string sql_str = "SELECT * FROM " + | 94 std::string sql_str = "SELECT * FROM " + |
| 95 std::string(APIAction::kTableName); | 95 std::string(APIAction::kTableName); |
| 96 sql::Statement statement(db.GetUniqueStatement(sql_str.c_str())); | 96 sql::Statement statement(db.GetUniqueStatement(sql_str.c_str())); |
| 97 ASSERT_TRUE(statement.Step()); | 97 ASSERT_TRUE(statement.Step()); |
| 98 ASSERT_EQ("UNKNOWN_ACTION", statement.ColumnString(2)); | 98 ASSERT_EQ("CALL", statement.ColumnString(2)); |
| 99 ASSERT_EQ("TABS", statement.ColumnString(3)); | 99 ASSERT_EQ("UNKNOWN_VERB", statement.ColumnString(3)); |
| 100 ASSERT_EQ("tabs.testMethod()", statement.ColumnString(4)); | 100 ASSERT_EQ("TABS", statement.ColumnString(4)); |
| 101 ASSERT_EQ("tabs.testMethod()", statement.ColumnString(5)); |
| 101 } | 102 } |
| 102 | 103 |
| 103 } // namespace extensions | 104 } // namespace extensions |
| 104 | 105 |
| OLD | NEW |