| 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 |
| 47 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); | 50 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); |
| 48 test_data_dir_ = test_data_dir_.AppendASCII("extensions"); | 51 test_data_dir_ = test_data_dir_.AppendASCII("extensions"); |
| 49 | 52 |
| 50 #if defined(OS_CHROMEOS) | 53 #if defined(OS_CHROMEOS) |
| 51 // This makes sure that we create the Default profile first, with no | 54 // This makes sure that we create the Default profile first, with no |
| 52 // ExtensionService and then the real profile with one, as we do when | 55 // ExtensionService and then the real profile with one, as we do when |
| 53 // running on chromeos. | 56 // running on chromeos. |
| 54 command_line->AppendSwitchASCII(switches::kLoginUser, | 57 command_line->AppendSwitchASCII(switches::kLoginUser, |
| 55 "TestUser@gmail.com"); | 58 "TestUser@gmail.com"); |
| 56 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); | 59 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 MessageLoopForUI::current()->Quit(); | 496 MessageLoopForUI::current()->Quit(); |
| 494 } | 497 } |
| 495 break; | 498 break; |
| 496 } | 499 } |
| 497 | 500 |
| 498 default: | 501 default: |
| 499 NOTREACHED(); | 502 NOTREACHED(); |
| 500 break; | 503 break; |
| 501 } | 504 } |
| 502 } | 505 } |
| OLD | NEW |