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/api/declarative_content/content_action.h" | 5 #include "chrome/browser/extensions/api/declarative_content/content_action.h" |
6 | 6 |
7 #include "base/test/values_test_util.h" | 7 #include "base/test/values_test_util.h" |
8 #include "chrome/browser/extensions/extension_action.h" | 8 #include "chrome/browser/extensions/extension_action.h" |
9 #include "chrome/browser/extensions/extension_action_manager.h" | 9 #include "chrome/browser/extensions/extension_action_manager.h" |
10 #include "chrome/browser/extensions/extension_tab_util.h" | 10 #include "chrome/browser/extensions/extension_tab_util.h" |
11 #include "chrome/browser/extensions/test_extension_environment.h" | 11 #include "chrome/browser/extensions/test_extension_environment.h" |
12 #include "chrome/common/extensions/extension_builder.h" | |
13 #include "chrome/test/base/testing_profile.h" | 12 #include "chrome/test/base/testing_profile.h" |
14 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
| 14 #include "extensions/common/extension_builder.h" |
15 #include "testing/gmock/include/gmock/gmock.h" | 15 #include "testing/gmock/include/gmock/gmock.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 | 17 |
18 namespace extensions { | 18 namespace extensions { |
19 namespace { | 19 namespace { |
20 | 20 |
21 using base::test::ParseJson; | 21 using base::test::ParseJson; |
22 using testing::HasSubstr; | 22 using testing::HasSubstr; |
23 | 23 |
24 TEST(DeclarativeContentActionTest, InvalidCreation) { | 24 TEST(DeclarativeContentActionTest, InvalidCreation) { |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 result->Apply(extension->id(), base::Time(), &apply_info); | 104 result->Apply(extension->id(), base::Time(), &apply_info); |
105 EXPECT_TRUE(page_action->GetIsVisible(tab_id)); | 105 EXPECT_TRUE(page_action->GetIsVisible(tab_id)); |
106 result->Revert(extension->id(), base::Time(), &apply_info); | 106 result->Revert(extension->id(), base::Time(), &apply_info); |
107 EXPECT_TRUE(page_action->GetIsVisible(tab_id)); | 107 EXPECT_TRUE(page_action->GetIsVisible(tab_id)); |
108 result->Revert(extension->id(), base::Time(), &apply_info); | 108 result->Revert(extension->id(), base::Time(), &apply_info); |
109 EXPECT_FALSE(page_action->GetIsVisible(tab_id)); | 109 EXPECT_FALSE(page_action->GetIsVisible(tab_id)); |
110 } | 110 } |
111 | 111 |
112 } // namespace | 112 } // namespace |
113 } // namespace extensions | 113 } // namespace extensions |
OLD | NEW |