Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: chrome/browser/extensions/extension_disabled_ui_browsertest.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/threading/sequenced_worker_pool.h" 10 #include "base/threading/sequenced_worker_pool.h"
11 #include "chrome/app/chrome_command_ids.h" 11 #include "chrome/app/chrome_command_ids.h"
12 #include "chrome/browser/extensions/extension_browsertest.h" 12 #include "chrome/browser/extensions/extension_browsertest.h"
13 #include "chrome/browser/extensions/extension_service.h" 13 #include "chrome/browser/extensions/extension_service.h"
14 #include "chrome/browser/extensions/extension_sync_data.h" 14 #include "chrome/browser/extensions/extension_sync_data.h"
15 #include "chrome/browser/extensions/extension_sync_service.h" 15 #include "chrome/browser/extensions/extension_sync_service.h"
16 #include "chrome/browser/extensions/extension_uninstall_dialog.h" 16 #include "chrome/browser/extensions/extension_uninstall_dialog.h"
17 #include "chrome/browser/extensions/updater/extension_updater.h" 17 #include "chrome/browser/extensions/updater/extension_updater.h"
18 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
19 #include "chrome/browser/ui/browser.h" 19 #include "chrome/browser/ui/browser.h"
20 #include "chrome/browser/ui/global_error/global_error.h" 20 #include "chrome/browser/ui/global_error/global_error.h"
21 #include "chrome/browser/ui/global_error/global_error_service.h" 21 #include "chrome/browser/ui/global_error/global_error_service.h"
22 #include "chrome/browser/ui/global_error/global_error_service_factory.h" 22 #include "chrome/browser/ui/global_error/global_error_service_factory.h"
23 #include "chrome/browser/ui/tabs/tab_strip_model.h" 23 #include "chrome/browser/ui/tabs/tab_strip_model.h"
24 #include "chrome/common/chrome_switches.h" 24 #include "chrome/common/chrome_switches.h"
25 #include "chrome/test/base/ui_test_utils.h" 25 #include "chrome/test/base/ui_test_utils.h"
26 #include "components/sync/api/fake_sync_change_processor.h"
27 #include "components/sync/api/sync_error_factory_mock.h"
28 #include "components/sync/protocol/extension_specifics.pb.h"
29 #include "components/sync/protocol/sync.pb.h"
26 #include "content/public/browser/browser_thread.h" 30 #include "content/public/browser/browser_thread.h"
27 #include "content/public/test/test_utils.h" 31 #include "content/public/test/test_utils.h"
28 #include "extensions/browser/extension_dialog_auto_confirm.h" 32 #include "extensions/browser/extension_dialog_auto_confirm.h"
29 #include "extensions/browser/extension_prefs.h" 33 #include "extensions/browser/extension_prefs.h"
30 #include "extensions/browser/extension_registry.h" 34 #include "extensions/browser/extension_registry.h"
31 #include "extensions/browser/extension_system.h" 35 #include "extensions/browser/extension_system.h"
32 #include "extensions/browser/scoped_ignore_content_verifier_for_test.h" 36 #include "extensions/browser/scoped_ignore_content_verifier_for_test.h"
33 #include "extensions/browser/test_extension_registry_observer.h" 37 #include "extensions/browser/test_extension_registry_observer.h"
34 #include "extensions/common/extension.h" 38 #include "extensions/common/extension.h"
35 #include "extensions/test/extension_test_message_listener.h" 39 #include "extensions/test/extension_test_message_listener.h"
36 #include "net/url_request/test_url_request_interceptor.h" 40 #include "net/url_request/test_url_request_interceptor.h"
37 #include "sync/api/fake_sync_change_processor.h"
38 #include "sync/api/sync_error_factory_mock.h"
39 #include "sync/protocol/extension_specifics.pb.h"
40 #include "sync/protocol/sync.pb.h"
41 41
42 using content::BrowserThread; 42 using content::BrowserThread;
43 using extensions::Extension; 43 using extensions::Extension;
44 using extensions::ExtensionRegistry; 44 using extensions::ExtensionRegistry;
45 using extensions::ExtensionPrefs; 45 using extensions::ExtensionPrefs;
46 using extensions::ExtensionSyncData; 46 using extensions::ExtensionSyncData;
47 47
48 class ExtensionDisabledGlobalErrorTest : public ExtensionBrowserTest { 48 class ExtensionDisabledGlobalErrorTest : public ExtensionBrowserTest {
49 protected: 49 protected:
50 void SetUpCommandLine(base::CommandLine* command_line) override { 50 void SetUpCommandLine(base::CommandLine* command_line) override {
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 317
318 const Extension* extension = service_->GetExtensionById(extension_id, true); 318 const Extension* extension = service_->GetExtensionById(extension_id, true);
319 ASSERT_TRUE(extension); 319 ASSERT_TRUE(extension);
320 EXPECT_EQ("2", extension->VersionString()); 320 EXPECT_EQ("2", extension->VersionString());
321 EXPECT_EQ(1u, registry_->disabled_extensions().size()); 321 EXPECT_EQ(1u, registry_->disabled_extensions().size());
322 EXPECT_EQ(Extension::DISABLE_REMOTE_INSTALL, 322 EXPECT_EQ(Extension::DISABLE_REMOTE_INSTALL,
323 ExtensionPrefs::Get(service_->profile()) 323 ExtensionPrefs::Get(service_->profile())
324 ->GetDisableReasons(extension_id)); 324 ->GetDisableReasons(extension_id));
325 EXPECT_TRUE(GetExtensionDisabledGlobalError()); 325 EXPECT_TRUE(GetExtensionDisabledGlobalError());
326 } 326 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.cc ('k') | chrome/browser/extensions/extension_prefs_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698