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_util.h" | 10 #include "base/file_util.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 } | 81 } |
82 | 82 |
83 // static | 83 // static |
84 const Extension* ExtensionBrowserTest::GetExtensionByPath( | 84 const Extension* ExtensionBrowserTest::GetExtensionByPath( |
85 const ExtensionSet* extensions, const base::FilePath& path) { | 85 const ExtensionSet* extensions, const base::FilePath& path) { |
86 base::FilePath extension_path = base::MakeAbsoluteFilePath(path); | 86 base::FilePath extension_path = base::MakeAbsoluteFilePath(path); |
87 EXPECT_TRUE(!extension_path.empty()); | 87 EXPECT_TRUE(!extension_path.empty()); |
88 for (ExtensionSet::const_iterator iter = extensions->begin(); | 88 for (ExtensionSet::const_iterator iter = extensions->begin(); |
89 iter != extensions->end(); ++iter) { | 89 iter != extensions->end(); ++iter) { |
90 if ((*iter)->path() == extension_path) { | 90 if ((*iter)->path() == extension_path) { |
91 return *iter; | 91 return iter->get(); |
92 } | 92 } |
93 } | 93 } |
94 return NULL; | 94 return NULL; |
95 } | 95 } |
96 | 96 |
97 void ExtensionBrowserTest::SetUpCommandLine(CommandLine* command_line) { | 97 void ExtensionBrowserTest::SetUpCommandLine(CommandLine* command_line) { |
98 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); | 98 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); |
99 test_data_dir_ = test_data_dir_.AppendASCII("extensions"); | 99 test_data_dir_ = test_data_dir_.AppendASCII("extensions"); |
100 | 100 |
101 #if defined(OS_CHROMEOS) | 101 #if defined(OS_CHROMEOS) |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 case content::NOTIFICATION_LOAD_STOP: | 733 case content::NOTIFICATION_LOAD_STOP: |
734 VLOG(1) << "Got LOAD_STOP notification."; | 734 VLOG(1) << "Got LOAD_STOP notification."; |
735 base::MessageLoopForUI::current()->Quit(); | 735 base::MessageLoopForUI::current()->Quit(); |
736 break; | 736 break; |
737 | 737 |
738 default: | 738 default: |
739 NOTREACHED(); | 739 NOTREACHED(); |
740 break; | 740 break; |
741 } | 741 } |
742 } | 742 } |
OLD | NEW |