OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 26 matching lines...) Expand all Loading... |
37 extension_installs_observed_(0), | 37 extension_installs_observed_(0), |
38 target_page_action_count_(-1), | 38 target_page_action_count_(-1), |
39 target_visible_page_action_count_(-1) { | 39 target_visible_page_action_count_(-1) { |
40 EXPECT_TRUE(temp_dir_.CreateUniqueTempDir()); | 40 EXPECT_TRUE(temp_dir_.CreateUniqueTempDir()); |
41 } | 41 } |
42 | 42 |
43 void ExtensionBrowserTest::SetUpCommandLine(CommandLine* command_line) { | 43 void ExtensionBrowserTest::SetUpCommandLine(CommandLine* command_line) { |
44 // This enables DOM automation for tab contentses. | 44 // This enables DOM automation for tab contentses. |
45 EnableDOMAutomation(); | 45 EnableDOMAutomation(); |
46 | 46 |
47 // This enables it for extension hosts. | |
48 ExtensionHost::EnableDOMAutomation(); | |
49 | |
50 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); | 47 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); |
51 test_data_dir_ = test_data_dir_.AppendASCII("extensions"); | 48 test_data_dir_ = test_data_dir_.AppendASCII("extensions"); |
52 | 49 |
53 #if defined(OS_CHROMEOS) | 50 #if defined(OS_CHROMEOS) |
54 // This makes sure that we create the Default profile first, with no | 51 // This makes sure that we create the Default profile first, with no |
55 // ExtensionService and then the real profile with one, as we do when | 52 // ExtensionService and then the real profile with one, as we do when |
56 // running on chromeos. | 53 // running on chromeos. |
57 command_line->AppendSwitchASCII(switches::kLoginUser, | 54 command_line->AppendSwitchASCII(switches::kLoginUser, |
58 "TestUser@gmail.com"); | 55 "TestUser@gmail.com"); |
59 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); | 56 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 MessageLoopForUI::current()->Quit(); | 493 MessageLoopForUI::current()->Quit(); |
497 } | 494 } |
498 break; | 495 break; |
499 } | 496 } |
500 | 497 |
501 default: | 498 default: |
502 NOTREACHED(); | 499 NOTREACHED(); |
503 break; | 500 break; |
504 } | 501 } |
505 } | 502 } |
OLD | NEW |