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

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

Issue 14890005: Enable Clang warnings in .cc files for Linux+[Aura/ChromeOS] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 7 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 command_line->AppendSwitch(switches::kIncognito); 929 command_line->AppendSwitch(switches::kIncognito);
930 PlatformAppBrowserTest::SetUpCommandLine(command_line); 930 PlatformAppBrowserTest::SetUpCommandLine(command_line);
931 } 931 }
932 virtual void SetUp() OVERRIDE { 932 virtual void SetUp() OVERRIDE {
933 // Make sure the file manager actually gets loaded. 933 // Make sure the file manager actually gets loaded.
934 ComponentLoader::EnableBackgroundExtensionsForTesting(); 934 ComponentLoader::EnableBackgroundExtensionsForTesting();
935 PlatformAppBrowserTest::SetUp(); 935 PlatformAppBrowserTest::SetUp();
936 } 936 }
937 937
938 // ShellWindowRegistry::Observer implementation. 938 // ShellWindowRegistry::Observer implementation.
939 virtual void OnShellWindowAdded(ShellWindow* shell_window) { 939 virtual void OnShellWindowAdded(ShellWindow* shell_window) OVERRIDE {
940 opener_app_ids_.insert(shell_window->extension()->id()); 940 opener_app_ids_.insert(shell_window->extension()->id());
941 } 941 }
942 virtual void OnShellWindowIconChanged(ShellWindow* shell_window) {} 942 virtual void OnShellWindowIconChanged(ShellWindow* shell_window) OVERRIDE {}
943 virtual void OnShellWindowRemoved(ShellWindow* shell_window) {} 943 virtual void OnShellWindowRemoved(ShellWindow* shell_window) OVERRIDE {}
944 944
945 protected: 945 protected:
946 // A set of ids of apps we've seen open a shell window. 946 // A set of ids of apps we've seen open a shell window.
947 std::set<std::string> opener_app_ids_; 947 std::set<std::string> opener_app_ids_;
948 }; 948 };
949 949
950 IN_PROC_BROWSER_TEST_F(PlatformAppIncognitoBrowserTest, IncognitoComponentApp) { 950 IN_PROC_BROWSER_TEST_F(PlatformAppIncognitoBrowserTest, IncognitoComponentApp) {
951 // Get the file manager app. 951 // Get the file manager app.
952 const Extension* file_manager = extension_service()->GetExtensionById( 952 const Extension* file_manager = extension_service()->GetExtensionById(
953 "hhaomjibdihmijegdhdafkllkbggdgoj", false); 953 "hhaomjibdihmijegdhdafkllkbggdgoj", false);
(...skipping 20 matching lines...) Expand all
974 974
975 while (!ContainsKey(opener_app_ids_, file_manager->id())) { 975 while (!ContainsKey(opener_app_ids_, file_manager->id())) {
976 content::RunAllPendingInMessageLoop(); 976 content::RunAllPendingInMessageLoop();
977 } 977 }
978 } 978 }
979 979
980 #endif // defined(OS_CHROMEOS) 980 #endif // defined(OS_CHROMEOS)
981 981
982 982
983 } // namespace extensions 983 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698