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

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

Issue 12212047: Linux/ChromeOS Chromium style checker cleanup, chrome/browser/extensions edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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 <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 14 matching lines...) Expand all
25 : public InProcessBrowserTest, public content::NotificationObserver { 25 : public InProcessBrowserTest, public content::NotificationObserver {
26 protected: 26 protected:
27 ExtensionFromWebAppTest() : installed_extension_(NULL) { 27 ExtensionFromWebAppTest() : installed_extension_(NULL) {
28 } 28 }
29 29
30 std::string expected_extension_id_; 30 std::string expected_extension_id_;
31 const Extension* installed_extension_; 31 const Extension* installed_extension_;
32 32
33 private: 33 private:
34 // InProcessBrowserTest 34 // InProcessBrowserTest
35 virtual void SetUpCommandLine(CommandLine* command_line) { 35 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
36 command_line->AppendSwitch(switches::kEnableCrxlessWebApps); 36 command_line->AppendSwitch(switches::kEnableCrxlessWebApps);
37 } 37 }
38 38
39 // content::NotificationObserver 39 // content::NotificationObserver
40 virtual void Observe(int type, 40 virtual void Observe(int type,
41 const content::NotificationSource& source, 41 const content::NotificationSource& source,
42 const content::NotificationDetails& details) { 42 const content::NotificationDetails& details) OVERRIDE {
43 if (type == chrome::NOTIFICATION_EXTENSION_INSTALLED) { 43 if (type == chrome::NOTIFICATION_EXTENSION_INSTALLED) {
44 const Extension* extension = 44 const Extension* extension =
45 content::Details<const Extension>(details).ptr(); 45 content::Details<const Extension>(details).ptr();
46 if (extension->id() == expected_extension_id_) { 46 if (extension->id() == expected_extension_id_) {
47 installed_extension_ = extension; 47 installed_extension_ = extension;
48 MessageLoopForUI::current()->Quit(); 48 MessageLoopForUI::current()->Quit();
49 } 49 }
50 } 50 }
51 } 51 }
52 }; 52 };
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 ASSERT_EQ(3u, installed_extension_->icons().map().size()); 85 ASSERT_EQ(3u, installed_extension_->icons().map().size());
86 EXPECT_EQ("icons/16.png", installed_extension_->icons().Get( 86 EXPECT_EQ("icons/16.png", installed_extension_->icons().Get(
87 16, ExtensionIconSet::MATCH_EXACTLY)); 87 16, ExtensionIconSet::MATCH_EXACTLY));
88 EXPECT_EQ("icons/48.png", installed_extension_->icons().Get( 88 EXPECT_EQ("icons/48.png", installed_extension_->icons().Get(
89 48, ExtensionIconSet::MATCH_EXACTLY)); 89 48, ExtensionIconSet::MATCH_EXACTLY));
90 EXPECT_EQ("icons/128.png", installed_extension_->icons().Get( 90 EXPECT_EQ("icons/128.png", installed_extension_->icons().Get(
91 128, ExtensionIconSet::MATCH_EXACTLY)); 91 128, ExtensionIconSet::MATCH_EXACTLY));
92 } 92 }
93 93
94 } // namespace extensions 94 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/component_loader_unittest.cc ('k') | chrome/browser/extensions/crx_installer_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698