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

Side by Side Diff: chrome/browser/ui/panels/base_panel_browser_test.cc

Issue 22794012: Rename extension_manifest_keys namespace to extensions::manifest_keys. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 | Annotate | Revision Log
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 "chrome/browser/ui/panels/base_panel_browser_test.h" 5 #include "chrome/browser/ui/panels/base_panel_browser_test.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "chrome/browser/chrome_notification_types.h" 13 #include "chrome/browser/chrome_notification_types.h"
14 #include "chrome/browser/extensions/extension_prefs.h" 14 #include "chrome/browser/extensions/extension_prefs.h"
15 #include "chrome/browser/extensions/extension_service.h" 15 #include "chrome/browser/extensions/extension_service.h"
16 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/browser/ui/browser.h" 17 #include "chrome/browser/ui/browser.h"
18 #include "chrome/browser/ui/browser_window.h" 18 #include "chrome/browser/ui/browser_window.h"
19 #include "chrome/browser/ui/panels/detached_panel_collection.h" 19 #include "chrome/browser/ui/panels/detached_panel_collection.h"
20 #include "chrome/browser/ui/panels/native_panel.h" 20 #include "chrome/browser/ui/panels/native_panel.h"
21 #include "chrome/browser/ui/panels/panel_collection.h" 21 #include "chrome/browser/ui/panels/panel_collection.h"
22 #include "chrome/browser/ui/panels/panel_mouse_watcher.h" 22 #include "chrome/browser/ui/panels/panel_mouse_watcher.h"
23 #include "chrome/browser/ui/panels/stacked_panel_collection.h" 23 #include "chrome/browser/ui/panels/stacked_panel_collection.h"
24 #include "chrome/browser/ui/panels/test_panel_active_state_observer.h" 24 #include "chrome/browser/ui/panels/test_panel_active_state_observer.h"
25 #include "chrome/browser/ui/panels/test_panel_mouse_watcher.h" 25 #include "chrome/browser/ui/panels/test_panel_mouse_watcher.h"
26 #include "chrome/common/chrome_paths.h" 26 #include "chrome/common/chrome_paths.h"
27 #include "chrome/common/chrome_switches.h" 27 #include "chrome/common/chrome_switches.h"
28 #include "chrome/common/extensions/extension_manifest_constants.h"
29 #include "chrome/test/base/interactive_test_utils.h" 28 #include "chrome/test/base/interactive_test_utils.h"
30 #include "chrome/test/base/ui_test_utils.h" 29 #include "chrome/test/base/ui_test_utils.h"
31 #include "content/public/browser/notification_service.h" 30 #include "content/public/browser/notification_service.h"
32 #include "content/public/common/url_constants.h" 31 #include "content/public/common/url_constants.h"
33 #include "content/public/test/web_contents_tester.h" 32 #include "content/public/test/web_contents_tester.h"
33 #include "extensions/common/manifest_constants.h"
34 #include "sync/api/string_ordinal.h" 34 #include "sync/api/string_ordinal.h"
35 35
36 #if defined(OS_LINUX) 36 #if defined(OS_LINUX)
37 #include "chrome/browser/ui/browser_window.h" 37 #include "chrome/browser/ui/browser_window.h"
38 #include "ui/base/x/x11_util.h" 38 #include "ui/base/x/x11_util.h"
39 #endif 39 #endif
40 40
41 #if defined(OS_LINUX) && !defined(USE_AURA) 41 #if defined(OS_LINUX) && !defined(USE_AURA)
42 #include "ui/base/x/active_window_watcher_x.h" 42 #include "ui/base/x/active_window_watcher_x.h"
43 #endif 43 #endif
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 540
541 scoped_refptr<Extension> BasePanelBrowserTest::CreateExtension( 541 scoped_refptr<Extension> BasePanelBrowserTest::CreateExtension(
542 const base::FilePath::StringType& path, 542 const base::FilePath::StringType& path,
543 extensions::Manifest::Location location, 543 extensions::Manifest::Location location,
544 const DictionaryValue& extra_value) { 544 const DictionaryValue& extra_value) {
545 extensions::ExtensionPrefs* extension_prefs = 545 extensions::ExtensionPrefs* extension_prefs =
546 extensions::ExtensionPrefs::Get(browser()->profile()); 546 extensions::ExtensionPrefs::Get(browser()->profile());
547 base::FilePath full_path = extension_prefs->install_directory().Append(path); 547 base::FilePath full_path = extension_prefs->install_directory().Append(path);
548 548
549 scoped_ptr<DictionaryValue> input_value(extra_value.DeepCopy()); 549 scoped_ptr<DictionaryValue> input_value(extra_value.DeepCopy());
550 input_value->SetString(extension_manifest_keys::kVersion, "1.0.0.0"); 550 input_value->SetString(extensions::manifest_keys::kVersion, "1.0.0.0");
551 input_value->SetString(extension_manifest_keys::kName, "Sample Extension"); 551 input_value->SetString(extensions::manifest_keys::kName, "Sample Extension");
552 552
553 std::string error; 553 std::string error;
554 scoped_refptr<Extension> extension = Extension::Create( 554 scoped_refptr<Extension> extension = Extension::Create(
555 full_path, location, *input_value, Extension::NO_FLAGS, &error); 555 full_path, location, *input_value, Extension::NO_FLAGS, &error);
556 EXPECT_TRUE(extension.get()); 556 EXPECT_TRUE(extension.get());
557 EXPECT_STREQ("", error.c_str()); 557 EXPECT_STREQ("", error.c_str());
558 browser()->profile()->GetExtensionService()-> 558 browser()->profile()->GetExtensionService()->
559 OnExtensionInstalled(extension.get(), 559 OnExtensionInstalled(extension.get(),
560 syncer::StringOrdinal(), 560 syncer::StringOrdinal(),
561 false /* no requirement errors */, 561 false /* no requirement errors */,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 return panel_name + base::IntToString(index); 608 return panel_name + base::IntToString(index);
609 } 609 }
610 610
611 bool BasePanelBrowserTest::WmSupportWindowActivation() { 611 bool BasePanelBrowserTest::WmSupportWindowActivation() {
612 #if defined(OS_LINUX) && !defined(USE_AURA) 612 #if defined(OS_LINUX) && !defined(USE_AURA)
613 return ui::ActiveWindowWatcherX::WMSupportsActivation(); 613 return ui::ActiveWindowWatcherX::WMSupportsActivation();
614 #else 614 #else
615 return true; 615 return true;
616 #endif 616 #endif
617 } 617 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698