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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 target_visible_page_action_count_(-1) { | 49 target_visible_page_action_count_(-1) { |
50 EXPECT_TRUE(temp_dir_.CreateUniqueTempDir()); | 50 EXPECT_TRUE(temp_dir_.CreateUniqueTempDir()); |
51 AppShortcutManager::SetShortcutCreationDisabledForTesting(true); | 51 AppShortcutManager::SetShortcutCreationDisabledForTesting(true); |
52 } | 52 } |
53 | 53 |
54 ExtensionBrowserTest::~ExtensionBrowserTest() { | 54 ExtensionBrowserTest::~ExtensionBrowserTest() { |
55 AppShortcutManager::SetShortcutCreationDisabledForTesting(false); | 55 AppShortcutManager::SetShortcutCreationDisabledForTesting(false); |
56 } | 56 } |
57 | 57 |
58 void ExtensionBrowserTest::SetUpCommandLine(CommandLine* command_line) { | 58 void ExtensionBrowserTest::SetUpCommandLine(CommandLine* command_line) { |
59 // This enables DOM automation for tab contentses. | |
60 EnableDOMAutomation(); | |
61 | |
62 extensions::Feature::SetChannelForTesting( | 59 extensions::Feature::SetChannelForTesting( |
63 chrome::VersionInfo::CHANNEL_UNKNOWN); | 60 chrome::VersionInfo::CHANNEL_UNKNOWN); |
64 | 61 |
65 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); | 62 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); |
66 test_data_dir_ = test_data_dir_.AppendASCII("extensions"); | 63 test_data_dir_ = test_data_dir_.AppendASCII("extensions"); |
67 | 64 |
68 #if defined(OS_CHROMEOS) | 65 #if defined(OS_CHROMEOS) |
69 // This makes sure that we create the Default profile first, with no | 66 // This makes sure that we create the Default profile first, with no |
70 // ExtensionService and then the real profile with one, as we do when | 67 // ExtensionService and then the real profile with one, as we do when |
71 // running on chromeos. | 68 // running on chromeos. |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 case content::NOTIFICATION_LOAD_STOP: | 631 case content::NOTIFICATION_LOAD_STOP: |
635 VLOG(1) << "Got LOAD_STOP notification."; | 632 VLOG(1) << "Got LOAD_STOP notification."; |
636 MessageLoopForUI::current()->Quit(); | 633 MessageLoopForUI::current()->Quit(); |
637 break; | 634 break; |
638 | 635 |
639 default: | 636 default: |
640 NOTREACHED(); | 637 NOTREACHED(); |
641 break; | 638 break; |
642 } | 639 } |
643 } | 640 } |
OLD | NEW |