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 "chrome/browser/extensions/extension_record_api.h" | 5 #include "chrome/browser/extensions/extension_record_api.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
14 #include "base/string_split.h" | 14 #include "base/string_split.h" |
15 #include "base/stringprintf.h" | 15 #include "base/stringprintf.h" |
16 #include "base/string_util.h" | 16 #include "base/string_util.h" |
17 #include "base/threading/sequenced_worker_pool.h" | 17 #include "base/threading/sequenced_worker_pool.h" |
18 #include "base/values.h" | 18 #include "base/values.h" |
19 #include "chrome/browser/extensions/extension_function_test_utils.h" | 19 #include "chrome/browser/extensions/extension_function_test_utils.h" |
20 #include "chrome/browser/ui/browser.h" | 20 #include "chrome/browser/ui/browser.h" |
21 #include "chrome/browser/ui/browser_window.h" | 21 #include "chrome/browser/ui/browser_window.h" |
22 #include "chrome/common/chrome_paths.h" | 22 #include "chrome/common/chrome_paths.h" |
23 #include "chrome/common/chrome_switches.h" | 23 #include "chrome/common/chrome_switches.h" |
24 #include "chrome/common/extensions/api/experimental.record.h" | 24 #include "chrome/common/extensions/api/experimental_record.h" |
25 #include "chrome/test/base/in_process_browser_test.h" | 25 #include "chrome/test/base/in_process_browser_test.h" |
26 #include "chrome/test/base/ui_test_utils.h" | 26 #include "chrome/test/base/ui_test_utils.h" |
27 #include "content/public/browser/browser_thread.h" | 27 #include "content/public/browser/browser_thread.h" |
28 #include "content/public/common/content_switches.h" | 28 #include "content/public/common/content_switches.h" |
29 | 29 |
30 namespace utils = extension_function_test_utils; | 30 namespace utils = extension_function_test_utils; |
31 | 31 |
32 namespace { | 32 namespace { |
33 | 33 |
34 // Dummy content for mock stats file. | 34 // Dummy content for mock stats file. |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 command_line.GetSwitchValueASCII(switches::kVisitURLsCount).compare("2") | 288 command_line.GetSwitchValueASCII(switches::kVisitURLsCount).compare("2") |
289 == 0); | 289 == 0); |
290 | 290 |
291 // Check for return value with proper stats. | 291 // Check for return value with proper stats. |
292 EXPECT_EQ(kTestStatistics, utils::GetString(result.get(), kStatsKey)); | 292 EXPECT_EQ(kTestStatistics, utils::GetString(result.get(), kStatsKey)); |
293 | 293 |
294 ListValue* errors = NULL; | 294 ListValue* errors = NULL; |
295 EXPECT_TRUE(result->GetList(kErrorsKey, &errors)); | 295 EXPECT_TRUE(result->GetList(kErrorsKey, &errors)); |
296 EXPECT_TRUE(VerifyURLHandling(errors, strategy)); | 296 EXPECT_TRUE(VerifyURLHandling(errors, strategy)); |
297 } | 297 } |
OLD | NEW |