Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Side by Side Diff: chrome/browser/search/hotword_service_unittest.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/search/hotword_service_factory.cc ('k') | chrome/browser/search/search.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/search/hotword_service.h" 5 #include "chrome/browser/search/hotword_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/metrics/field_trial.h" 11 #include "base/metrics/field_trial.h"
12 #include "base/prefs/pref_service.h"
13 #include "base/test/test_simple_task_runner.h" 12 #include "base/test/test_simple_task_runner.h"
14 #include "build/build_config.h" 13 #include "build/build_config.h"
15 #include "chrome/browser/browser_process.h" 14 #include "chrome/browser/browser_process.h"
16 #include "chrome/browser/extensions/extension_service_test_base.h" 15 #include "chrome/browser/extensions/extension_service_test_base.h"
17 #include "chrome/browser/extensions/test_extension_service.h" 16 #include "chrome/browser/extensions/test_extension_service.h"
18 #include "chrome/browser/search/hotword_audio_history_handler.h" 17 #include "chrome/browser/search/hotword_audio_history_handler.h"
19 #include "chrome/browser/search/hotword_service_factory.h" 18 #include "chrome/browser/search/hotword_service_factory.h"
20 #include "chrome/common/chrome_switches.h" 19 #include "chrome/common/chrome_switches.h"
21 #include "chrome/common/extensions/extension_constants.h" 20 #include "chrome/common/extensions/extension_constants.h"
22 #include "chrome/common/pref_names.h" 21 #include "chrome/common/pref_names.h"
23 #include "chrome/test/base/testing_profile.h" 22 #include "chrome/test/base/testing_profile.h"
24 #include "components/history/core/browser/web_history_service.h" 23 #include "components/history/core/browser/web_history_service.h"
24 #include "components/prefs/pref_service.h"
25 #include "content/public/test/test_browser_thread_bundle.h" 25 #include "content/public/test/test_browser_thread_bundle.h"
26 #include "extensions/browser/extension_system.h" 26 #include "extensions/browser/extension_system.h"
27 #include "extensions/common/extension.h" 27 #include "extensions/common/extension.h"
28 #include "extensions/common/extension_builder.h" 28 #include "extensions/common/extension_builder.h"
29 #include "extensions/common/manifest.h" 29 #include "extensions/common/manifest.h"
30 #include "extensions/common/one_shot_event.h" 30 #include "extensions/common/one_shot_event.h"
31 #include "testing/gtest/include/gtest/gtest.h" 31 #include "testing/gtest/include/gtest/gtest.h"
32 32
33 #if defined(OS_CHROMEOS) 33 #if defined(OS_CHROMEOS)
34 #include "chromeos/audio/cras_audio_handler.h" 34 #include "chromeos/audio/cras_audio_handler.h"
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 EXPECT_EQ(1, audio_history_handler->GetAudioHistoryCalls()); 524 EXPECT_EQ(1, audio_history_handler->GetAudioHistoryCalls());
525 // We expect the next check for audio history to be in the queue. 525 // We expect the next check for audio history to be in the queue.
526 EXPECT_EQ(base::TimeDelta::FromDays(1), 526 EXPECT_EQ(base::TimeDelta::FromDays(1),
527 test_task_runner->NextPendingTaskDelay()); 527 test_task_runner->NextPendingTaskDelay());
528 EXPECT_TRUE(test_task_runner->HasPendingTask()); 528 EXPECT_TRUE(test_task_runner->HasPendingTask());
529 test_task_runner->RunPendingTasks(); 529 test_task_runner->RunPendingTasks();
530 EXPECT_EQ(2, audio_history_handler->GetAudioHistoryCalls()); 530 EXPECT_EQ(2, audio_history_handler->GetAudioHistoryCalls());
531 EXPECT_TRUE(test_task_runner->HasPendingTask()); 531 EXPECT_TRUE(test_task_runner->HasPendingTask());
532 test_task_runner->ClearPendingTasks(); 532 test_task_runner->ClearPendingTasks();
533 } 533 }
OLDNEW
« no previous file with comments | « chrome/browser/search/hotword_service_factory.cc ('k') | chrome/browser/search/search.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698