| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 130   // Find the loaded extension by its path. See crbug.com/59531 for why | 130   // Find the loaded extension by its path. See crbug.com/59531 for why | 
| 131   // we cannot just use last_loaded_extension_id_. | 131   // we cannot just use last_loaded_extension_id_. | 
| 132   const Extension* extension = GetExtensionByPath(service->extensions(), path); | 132   const Extension* extension = GetExtensionByPath(service->extensions(), path); | 
| 133   if (!extension) | 133   if (!extension) | 
| 134     return NULL; | 134     return NULL; | 
| 135 | 135 | 
| 136   if (!(flags & kFlagIgnoreManifestWarnings)) { | 136   if (!(flags & kFlagIgnoreManifestWarnings)) { | 
| 137     const std::vector<extensions::InstallWarning>& install_warnings = | 137     const std::vector<extensions::InstallWarning>& install_warnings = | 
| 138         extension->install_warnings(); | 138         extension->install_warnings(); | 
| 139     if (!install_warnings.empty()) { | 139     if (!install_warnings.empty()) { | 
| 140       std::string install_warnings_message = StringPrintf( | 140       std::string install_warnings_message = base::StringPrintf( | 
| 141           "Unexpected warnings when loading test extension %s:\n", | 141           "Unexpected warnings when loading test extension %s:\n", | 
| 142           path.AsUTF8Unsafe().c_str()); | 142           path.AsUTF8Unsafe().c_str()); | 
| 143 | 143 | 
| 144       for (std::vector<extensions::InstallWarning>::const_iterator it = | 144       for (std::vector<extensions::InstallWarning>::const_iterator it = | 
| 145           install_warnings.begin(); it != install_warnings.end(); ++it) { | 145           install_warnings.begin(); it != install_warnings.end(); ++it) { | 
| 146         install_warnings_message += "  " + it->message + "\n"; | 146         install_warnings_message += "  " + it->message + "\n"; | 
| 147       } | 147       } | 
| 148 | 148 | 
| 149       EXPECT_TRUE(extension->install_warnings().empty()) << | 149       EXPECT_TRUE(extension->install_warnings().empty()) << | 
| 150           install_warnings_message; | 150           install_warnings_message; | 
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 726     case content::NOTIFICATION_LOAD_STOP: | 726     case content::NOTIFICATION_LOAD_STOP: | 
| 727       VLOG(1) << "Got LOAD_STOP notification."; | 727       VLOG(1) << "Got LOAD_STOP notification."; | 
| 728       MessageLoopForUI::current()->Quit(); | 728       MessageLoopForUI::current()->Quit(); | 
| 729       break; | 729       break; | 
| 730 | 730 | 
| 731     default: | 731     default: | 
| 732       NOTREACHED(); | 732       NOTREACHED(); | 
| 733       break; | 733       break; | 
| 734   } | 734   } | 
| 735 } | 735 } | 
| OLD | NEW | 
|---|