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/extension_browsertest.h" | 5 #include "chrome/browser/extensions/extension_browsertest.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "content/public/browser/navigation_controller.h" | 36 #include "content/public/browser/navigation_controller.h" |
37 #include "content/public/browser/navigation_entry.h" | 37 #include "content/public/browser/navigation_entry.h" |
38 #include "content/public/browser/notification_registrar.h" | 38 #include "content/public/browser/notification_registrar.h" |
39 #include "content/public/browser/notification_service.h" | 39 #include "content/public/browser/notification_service.h" |
40 #include "content/public/browser/render_view_host.h" | 40 #include "content/public/browser/render_view_host.h" |
41 #include "content/public/test/browser_test_utils.h" | 41 #include "content/public/test/browser_test_utils.h" |
42 #include "sync/api/string_ordinal.h" | 42 #include "sync/api/string_ordinal.h" |
43 | 43 |
44 using extensions::Extension; | 44 using extensions::Extension; |
45 using extensions::ExtensionCreator; | 45 using extensions::ExtensionCreator; |
| 46 using extensions::FeatureSwitch; |
46 | 47 |
47 ExtensionBrowserTest::ExtensionBrowserTest() | 48 ExtensionBrowserTest::ExtensionBrowserTest() |
48 : loaded_(false), | 49 : loaded_(false), |
49 installed_(false), | 50 installed_(false), |
50 extension_installs_observed_(0), | 51 extension_installs_observed_(0), |
51 extension_load_errors_observed_(0), | 52 extension_load_errors_observed_(0), |
52 target_page_action_count_(-1), | 53 target_page_action_count_(-1), |
53 target_visible_page_action_count_(-1), | 54 target_visible_page_action_count_(-1), |
54 current_channel_(chrome::VersionInfo::CHANNEL_DEV), | 55 current_channel_(chrome::VersionInfo::CHANNEL_DEV), |
55 override_prompt_for_external_extensions_( | 56 override_prompt_for_external_extensions_( |
56 extensions::FeatureSwitch::prompt_for_external_extensions(), false) { | 57 FeatureSwitch::prompt_for_external_extensions(), false), |
| 58 override_sideload_wipeout_( |
| 59 FeatureSwitch::sideload_wipeout(), false) { |
57 EXPECT_TRUE(temp_dir_.CreateUniqueTempDir()); | 60 EXPECT_TRUE(temp_dir_.CreateUniqueTempDir()); |
58 } | 61 } |
59 | 62 |
60 ExtensionBrowserTest::~ExtensionBrowserTest() {} | 63 ExtensionBrowserTest::~ExtensionBrowserTest() {} |
61 | 64 |
62 void ExtensionBrowserTest::SetUpCommandLine(CommandLine* command_line) { | 65 void ExtensionBrowserTest::SetUpCommandLine(CommandLine* command_line) { |
63 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); | 66 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); |
64 test_data_dir_ = test_data_dir_.AppendASCII("extensions"); | 67 test_data_dir_ = test_data_dir_.AppendASCII("extensions"); |
65 | 68 |
66 #if defined(OS_CHROMEOS) | 69 #if defined(OS_CHROMEOS) |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 case content::NOTIFICATION_LOAD_STOP: | 680 case content::NOTIFICATION_LOAD_STOP: |
678 VLOG(1) << "Got LOAD_STOP notification."; | 681 VLOG(1) << "Got LOAD_STOP notification."; |
679 MessageLoopForUI::current()->Quit(); | 682 MessageLoopForUI::current()->Quit(); |
680 break; | 683 break; |
681 | 684 |
682 default: | 685 default: |
683 NOTREACHED(); | 686 NOTREACHED(); |
684 break; | 687 break; |
685 } | 688 } |
686 } | 689 } |
OLD | NEW |