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

Side by Side Diff: chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api_chromeos_unittest.cc

Issue 1112573002: [chrome/browser/extensions] Replace MessageLoopProxy usage with ThreadTaskRunnerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolving ng browser unittest issues Created 5 years, 7 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
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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/thread_task_runner_handle.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_ api.h" 11 #include "chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_ api.h"
12 #include "chrome/browser/extensions/extension_api_unittest.h" 12 #include "chrome/browser/extensions/extension_api_unittest.h"
13 #include "chrome/browser/extensions/extension_function_test_utils.h" 13 #include "chrome/browser/extensions/extension_function_test_utils.h"
14 #include "chrome/browser/extensions/extension_system_factory.h" 14 #include "chrome/browser/extensions/extension_system_factory.h"
15 #include "chrome/browser/extensions/test_extension_prefs.h" 15 #include "chrome/browser/extensions/test_extension_prefs.h"
16 #include "chrome/browser/extensions/test_extension_system.h" 16 #include "chrome/browser/extensions/test_extension_system.h"
17 #include "chrome/browser/signin/easy_unlock_app_manager.h" 17 #include "chrome/browser/signin/easy_unlock_app_manager.h"
18 #include "chrome/browser/signin/easy_unlock_service_factory.h" 18 #include "chrome/browser/signin/easy_unlock_service_factory.h"
19 #include "chrome/browser/signin/easy_unlock_service_regular.h" 19 #include "chrome/browser/signin/easy_unlock_service_regular.h"
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 std::string last_extension_id_; 449 std::string last_extension_id_;
450 std::string last_event_name_; 450 std::string last_event_name_;
451 }; 451 };
452 452
453 // A fake ExtensionSystem that returns a FakeEventRouter for event_router(). 453 // A fake ExtensionSystem that returns a FakeEventRouter for event_router().
454 class FakeExtensionSystem : public extensions::TestExtensionSystem { 454 class FakeExtensionSystem : public extensions::TestExtensionSystem {
455 public: 455 public:
456 explicit FakeExtensionSystem(Profile* profile) 456 explicit FakeExtensionSystem(Profile* profile)
457 : TestExtensionSystem(profile), 457 : TestExtensionSystem(profile),
458 prefs_(new extensions::TestExtensionPrefs( 458 prefs_(new extensions::TestExtensionPrefs(
459 base::MessageLoopProxy::current())) { 459 base::ThreadTaskRunnerHandle::Get())) {
460 fake_event_router_.reset(new FakeEventRouter(profile, prefs_->prefs())); 460 fake_event_router_.reset(new FakeEventRouter(profile, prefs_->prefs()));
461 } 461 }
462 462
463 extensions::EventRouter* event_router() override { 463 extensions::EventRouter* event_router() override {
464 return fake_event_router_.get(); 464 return fake_event_router_.get();
465 } 465 }
466 466
467 private: 467 private:
468 scoped_ptr<extensions::TestExtensionPrefs> prefs_; 468 scoped_ptr<extensions::TestExtensionPrefs> prefs_;
469 scoped_ptr<FakeEventRouter> fake_event_router_; 469 scoped_ptr<FakeEventRouter> fake_event_router_;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 ASSERT_TRUE(extension_function_test_utils::RunFunction( 516 ASSERT_TRUE(extension_function_test_utils::RunFunction(
517 function.get(), 517 function.get(),
518 "[{\"success\":true}]", 518 "[{\"success\":true}]",
519 browser(), 519 browser(),
520 extension_function_test_utils::NONE)); 520 extension_function_test_utils::NONE));
521 EXPECT_TRUE(result.success); 521 EXPECT_TRUE(result.success);
522 EXPECT_TRUE(result.error.empty()); 522 EXPECT_TRUE(result.error.empty());
523 } 523 }
524 524
525 } // namespace 525 } // namespace
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698