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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 enum PermittedFeature { | 60 enum PermittedFeature { |
61 PERMITTED_NONE, | 61 PERMITTED_NONE, |
62 PERMITTED_SCRIPT_ONLY, | 62 PERMITTED_SCRIPT_ONLY, |
63 PERMITTED_CAPTURE_ONLY, | 63 PERMITTED_CAPTURE_ONLY, |
64 PERMITTED_BOTH | 64 PERMITTED_BOTH |
65 }; | 65 }; |
66 | 66 |
67 class ActiveTabTest : public ChromeRenderViewHostTestHarness { | 67 class ActiveTabTest : public ChromeRenderViewHostTestHarness { |
68 protected: | 68 protected: |
69 ActiveTabTest() | 69 ActiveTabTest() |
70 : current_channel(chrome::VersionInfo::CHANNEL_DEV), | 70 : current_channel(version_info::Channel::DEV), |
71 extension(CreateTestExtension("deadbeef", true, false)), | 71 extension(CreateTestExtension("deadbeef", true, false)), |
72 another_extension(CreateTestExtension("feedbeef", true, false)), | 72 another_extension(CreateTestExtension("feedbeef", true, false)), |
73 extension_without_active_tab(CreateTestExtension("badbeef", | 73 extension_without_active_tab(CreateTestExtension("badbeef", |
74 false, | 74 false, |
75 false)), | 75 false)), |
76 extension_with_tab_capture(CreateTestExtension("cafebeef", | 76 extension_with_tab_capture(CreateTestExtension("cafebeef", |
77 true, | 77 true, |
78 true)) {} | 78 true)) {} |
79 | 79 |
80 void SetUp() override { | 80 void SetUp() override { |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 EXPECT_TRUE(permissions_data->HasAPIPermissionForTab( | 372 EXPECT_TRUE(permissions_data->HasAPIPermissionForTab( |
373 tab_id(), APIPermission::kTabCaptureForTab)); | 373 tab_id(), APIPermission::kTabCaptureForTab)); |
374 | 374 |
375 EXPECT_TRUE(IsBlocked(extension_with_tab_capture, internal, tab_id() + 1)); | 375 EXPECT_TRUE(IsBlocked(extension_with_tab_capture, internal, tab_id() + 1)); |
376 EXPECT_FALSE(permissions_data->HasAPIPermissionForTab( | 376 EXPECT_FALSE(permissions_data->HasAPIPermissionForTab( |
377 tab_id() + 1, APIPermission::kTabCaptureForTab)); | 377 tab_id() + 1, APIPermission::kTabCaptureForTab)); |
378 } | 378 } |
379 | 379 |
380 } // namespace | 380 } // namespace |
381 } // namespace extensions | 381 } // namespace extensions |
OLD | NEW |