| 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 "base/files/file_path.h" | 5 #include "base/files/file_path.h" |
| 6 #include "base/files/scoped_temp_dir.h" | 6 #include "base/files/scoped_temp_dir.h" |
| 7 #include "base/threading/sequenced_worker_pool.h" | 7 #include "base/threading/sequenced_worker_pool.h" |
| 8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
| 9 #include "chrome/browser/extensions/extension_browsertest.h" | 9 #include "chrome/browser/extensions/extension_browsertest.h" |
| 10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "sync/protocol/extension_specifics.pb.h" | 26 #include "sync/protocol/extension_specifics.pb.h" |
| 27 #include "sync/protocol/sync.pb.h" | 27 #include "sync/protocol/sync.pb.h" |
| 28 | 28 |
| 29 using content::BrowserThread; | 29 using content::BrowserThread; |
| 30 using extensions::Extension; | 30 using extensions::Extension; |
| 31 using extensions::ExtensionRegistry; | 31 using extensions::ExtensionRegistry; |
| 32 using extensions::ExtensionPrefs; | 32 using extensions::ExtensionPrefs; |
| 33 | 33 |
| 34 class ExtensionDisabledGlobalErrorTest : public ExtensionBrowserTest { | 34 class ExtensionDisabledGlobalErrorTest : public ExtensionBrowserTest { |
| 35 protected: | 35 protected: |
| 36 void SetUpCommandLine(CommandLine* command_line) override { | 36 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 37 ExtensionBrowserTest::SetUpCommandLine(command_line); | 37 ExtensionBrowserTest::SetUpCommandLine(command_line); |
| 38 command_line->AppendSwitchASCII(switches::kAppsGalleryUpdateURL, | 38 command_line->AppendSwitchASCII(switches::kAppsGalleryUpdateURL, |
| 39 "http://localhost/autoupdate/updates.xml"); | 39 "http://localhost/autoupdate/updates.xml"); |
| 40 } | 40 } |
| 41 | 41 |
| 42 void SetUpOnMainThread() override { | 42 void SetUpOnMainThread() override { |
| 43 ExtensionBrowserTest::SetUpOnMainThread(); | 43 ExtensionBrowserTest::SetUpOnMainThread(); |
| 44 EXPECT_TRUE(scoped_temp_dir_.CreateUniqueTempDir()); | 44 EXPECT_TRUE(scoped_temp_dir_.CreateUniqueTempDir()); |
| 45 service_ = extensions::ExtensionSystem::Get( | 45 service_ = extensions::ExtensionSystem::Get( |
| 46 browser()->profile())->extension_service(); | 46 browser()->profile())->extension_service(); |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 | 245 |
| 246 const Extension* extension = service_->GetExtensionById(extension_id, true); | 246 const Extension* extension = service_->GetExtensionById(extension_id, true); |
| 247 ASSERT_TRUE(extension); | 247 ASSERT_TRUE(extension); |
| 248 EXPECT_EQ("2", extension->VersionString()); | 248 EXPECT_EQ("2", extension->VersionString()); |
| 249 EXPECT_EQ(1u, registry_->disabled_extensions().size()); | 249 EXPECT_EQ(1u, registry_->disabled_extensions().size()); |
| 250 EXPECT_EQ(Extension::DISABLE_REMOTE_INSTALL, | 250 EXPECT_EQ(Extension::DISABLE_REMOTE_INSTALL, |
| 251 ExtensionPrefs::Get(service_->profile()) | 251 ExtensionPrefs::Get(service_->profile()) |
| 252 ->GetDisableReasons(extension_id)); | 252 ->GetDisableReasons(extension_id)); |
| 253 EXPECT_TRUE(GetExtensionDisabledGlobalError()); | 253 EXPECT_TRUE(GetExtensionDisabledGlobalError()); |
| 254 } | 254 } |
| OLD | NEW |