| 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 <string> | 5 #include <string> | 
| 6 #include <vector> | 6 #include <vector> | 
| 7 | 7 | 
| 8 #include "base/memory/linked_ptr.h" |  | 
| 9 #include "chrome/browser/extensions/api/log_private/filter_handler.h" | 8 #include "chrome/browser/extensions/api/log_private/filter_handler.h" | 
| 10 #include "chrome/browser/extensions/api/log_private/log_parser.h" | 9 #include "chrome/browser/extensions/api/log_private/log_parser.h" | 
| 11 #include "chrome/browser/extensions/api/log_private/syslog_parser.h" | 10 #include "chrome/browser/extensions/api/log_private/syslog_parser.h" | 
| 12 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" | 
| 13 | 12 | 
| 14 namespace extensions { | 13 namespace extensions { | 
| 15 namespace { | 14 namespace { | 
| 16 | 15 | 
| 17 const char kKernelLogEntry[] = | 16 const char kKernelLogEntry[] = | 
| 18     "2014-08-18T14:04:58.606132-07:00 kernel: [269374.012690] " | 17     "2014-08-18T14:04:58.606132-07:00 kernel: [269374.012690] " | 
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 59   p.Parse(kWpaSupplicantLogEntry, &output, &filter_handler); | 58   p.Parse(kWpaSupplicantLogEntry, &output, &filter_handler); | 
| 60   ASSERT_EQ(3u, output.size()); | 59   ASSERT_EQ(3u, output.size()); | 
| 61   EXPECT_EQ("unknown", output[2].level); | 60   EXPECT_EQ("unknown", output[2].level); | 
| 62   EXPECT_EQ("wpa_supplicant", output[2].process); | 61   EXPECT_EQ("wpa_supplicant", output[2].process); | 
| 63   EXPECT_EQ("818", output[2].process_id); | 62   EXPECT_EQ("818", output[2].process_id); | 
| 64   EXPECT_EQ(kWpaSupplicantLogEntry, output[2].full_entry); | 63   EXPECT_EQ(kWpaSupplicantLogEntry, output[2].full_entry); | 
| 65   EXPECT_DOUBLE_EQ(1408131366137.021, output[2].timestamp); | 64   EXPECT_DOUBLE_EQ(1408131366137.021, output[2].timestamp); | 
| 66 } | 65 } | 
| 67 | 66 | 
| 68 }  // namespace extensions | 67 }  // namespace extensions | 
| OLD | NEW | 
|---|