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

Side by Side Diff: extensions/browser/api/idle/idle_api_unittest.cc

Issue 1226353004: Generate all extension schema namespaces as "api" and instead vary the generated bundle names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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 (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 "extensions/browser/api/idle/idle_api.h" 5 #include "extensions/browser/api/idle/idle_api.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
12 #include "extensions/browser/api/idle/idle_api_constants.h" 12 #include "extensions/browser/api/idle/idle_api_constants.h"
13 #include "extensions/browser/api/idle/idle_manager_factory.h" 13 #include "extensions/browser/api/idle/idle_manager_factory.h"
14 #include "extensions/browser/api/idle/idle_manager.h" 14 #include "extensions/browser/api/idle/idle_manager.h"
15 #include "extensions/browser/api_unittest.h" 15 #include "extensions/browser/api_unittest.h"
16 #include "extensions/browser/event_router.h" 16 #include "extensions/browser/event_router.h"
17 #include "extensions/browser/extension_registry.h" 17 #include "extensions/browser/extension_registry.h"
18 #include "extensions/common/api/idle.h" 18 #include "extensions/common/api/idle.h"
19 #include "extensions/common/extension.h" 19 #include "extensions/common/extension.h"
20 #include "testing/gmock/include/gmock/gmock.h" 20 #include "testing/gmock/include/gmock/gmock.h"
21 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
22 22
23 using ::testing::_; 23 using ::testing::_;
24 24
25 namespace idle = extensions::core_api::idle; 25 namespace idle = extensions::api::idle;
26 26
27 namespace extensions { 27 namespace extensions {
28 28
29 namespace { 29 namespace {
30 30
31 class MockEventDelegate : public IdleManager::EventDelegate { 31 class MockEventDelegate : public IdleManager::EventDelegate {
32 public: 32 public:
33 MockEventDelegate() {} 33 MockEventDelegate() {}
34 virtual ~MockEventDelegate() {} 34 virtual ~MockEventDelegate() {}
35 MOCK_METHOD2(OnStateChanged, void(const std::string&, ui::IdleState)); 35 MOCK_METHOD2(OnStateChanged, void(const std::string&, ui::IdleState));
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 547
548 { 548 {
549 // Nothing should have fired, the listener wasn't added until afterward. 549 // Nothing should have fired, the listener wasn't added until afterward.
550 ScopedListen listen(idle_manager_, "test"); 550 ScopedListen listen(idle_manager_, "test");
551 idle_manager_->UpdateIdleState(); 551 idle_manager_->UpdateIdleState();
552 testing::Mock::VerifyAndClearExpectations(event_delegate_); 552 testing::Mock::VerifyAndClearExpectations(event_delegate_);
553 } 553 }
554 } 554 }
555 555
556 } // namespace extensions 556 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/hid/hid_device_manager.cc ('k') | extensions/browser/api/idle/idle_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698