OLD | NEW |
---|---|
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" | 8 #include "base/message_loop/message_loop.h" |
not at google - send to devlin
2015/04/29 16:13:49
Also remove the includes for MessageLoop, here and
Pranay
2015/05/04 03:19:55
Done.
| |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "base/thread_task_runner_handle.h" | |
10 #include "base/values.h" | 11 #include "base/values.h" |
11 #include "chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_ api.h" | 12 #include "chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_ api.h" |
12 #include "chrome/browser/extensions/extension_api_unittest.h" | 13 #include "chrome/browser/extensions/extension_api_unittest.h" |
13 #include "chrome/browser/extensions/extension_function_test_utils.h" | 14 #include "chrome/browser/extensions/extension_function_test_utils.h" |
14 #include "chrome/browser/extensions/extension_system_factory.h" | 15 #include "chrome/browser/extensions/extension_system_factory.h" |
15 #include "chrome/browser/extensions/test_extension_prefs.h" | 16 #include "chrome/browser/extensions/test_extension_prefs.h" |
16 #include "chrome/browser/extensions/test_extension_system.h" | 17 #include "chrome/browser/extensions/test_extension_system.h" |
17 #include "chrome/browser/signin/easy_unlock_app_manager.h" | 18 #include "chrome/browser/signin/easy_unlock_app_manager.h" |
18 #include "chrome/browser/signin/easy_unlock_service_factory.h" | 19 #include "chrome/browser/signin/easy_unlock_service_factory.h" |
19 #include "chrome/browser/signin/easy_unlock_service_regular.h" | 20 #include "chrome/browser/signin/easy_unlock_service_regular.h" |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
449 std::string last_extension_id_; | 450 std::string last_extension_id_; |
450 std::string last_event_name_; | 451 std::string last_event_name_; |
451 }; | 452 }; |
452 | 453 |
453 // A fake ExtensionSystem that returns a FakeEventRouter for event_router(). | 454 // A fake ExtensionSystem that returns a FakeEventRouter for event_router(). |
454 class FakeExtensionSystem : public extensions::TestExtensionSystem { | 455 class FakeExtensionSystem : public extensions::TestExtensionSystem { |
455 public: | 456 public: |
456 explicit FakeExtensionSystem(Profile* profile) | 457 explicit FakeExtensionSystem(Profile* profile) |
457 : TestExtensionSystem(profile), | 458 : TestExtensionSystem(profile), |
458 prefs_(new extensions::TestExtensionPrefs( | 459 prefs_(new extensions::TestExtensionPrefs( |
459 base::MessageLoopProxy::current())) { | 460 base::ThreadTaskRunnerHandle::Get())) { |
460 fake_event_router_.reset(new FakeEventRouter(profile, prefs_->prefs())); | 461 fake_event_router_.reset(new FakeEventRouter(profile, prefs_->prefs())); |
461 } | 462 } |
462 | 463 |
463 extensions::EventRouter* event_router() override { | 464 extensions::EventRouter* event_router() override { |
464 return fake_event_router_.get(); | 465 return fake_event_router_.get(); |
465 } | 466 } |
466 | 467 |
467 private: | 468 private: |
468 scoped_ptr<extensions::TestExtensionPrefs> prefs_; | 469 scoped_ptr<extensions::TestExtensionPrefs> prefs_; |
469 scoped_ptr<FakeEventRouter> fake_event_router_; | 470 scoped_ptr<FakeEventRouter> fake_event_router_; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
516 ASSERT_TRUE(extension_function_test_utils::RunFunction( | 517 ASSERT_TRUE(extension_function_test_utils::RunFunction( |
517 function.get(), | 518 function.get(), |
518 "[{\"success\":true}]", | 519 "[{\"success\":true}]", |
519 browser(), | 520 browser(), |
520 extension_function_test_utils::NONE)); | 521 extension_function_test_utils::NONE)); |
521 EXPECT_TRUE(result.success); | 522 EXPECT_TRUE(result.success); |
522 EXPECT_TRUE(result.error.empty()); | 523 EXPECT_TRUE(result.error.empty()); |
523 } | 524 } |
524 | 525 |
525 } // namespace | 526 } // namespace |
OLD | NEW |