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

Side by Side Diff: chrome/browser/apps/app_shim/app_shim_quit_interactive_uitest_mac.mm

Issue 709813004: Remove the deprecated function ExtensionService::extensions(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed thestig@'s comments. Created 6 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/background/background_application_list_model_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // Tests behavior when quitting apps with app shims. 5 // Tests behavior when quitting apps with app shims.
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #include <vector> 8 #include <vector>
9 9
10 #include "apps/switches.h" 10 #include "apps/switches.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); 63 ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
64 ASSERT_EQ(1u, [[NSApp windows] count]); 64 ASSERT_EQ(1u, [[NSApp windows] count]);
65 65
66 handler_ = g_browser_process->platform_part()->app_shim_host_manager()-> 66 handler_ = g_browser_process->platform_part()->app_shim_host_manager()->
67 extension_app_shim_handler(); 67 extension_app_shim_handler();
68 68
69 // Attach a host for the app. 69 // Attach a host for the app.
70 extensions::ExtensionRegistry* registry = 70 extensions::ExtensionRegistry* registry =
71 extensions::ExtensionRegistry::Get(profile()); 71 extensions::ExtensionRegistry::Get(profile());
72 extension_id_ = 72 extension_id_ =
73 GetExtensionByPath(&registry->enabled_extensions(), app_path_)->id(); 73 GetExtensionByPath(registry->enabled_extensions(), app_path_)->id();
74 host_.reset(new FakeHost(profile()->GetPath().BaseName(), 74 host_.reset(new FakeHost(profile()->GetPath().BaseName(),
75 extension_id_, 75 extension_id_,
76 handler_)); 76 handler_));
77 handler_->OnShimLaunch(host_.get(), 77 handler_->OnShimLaunch(host_.get(),
78 APP_SHIM_LAUNCH_REGISTER_ONLY, 78 APP_SHIM_LAUNCH_REGISTER_ONLY,
79 std::vector<base::FilePath>()); 79 std::vector<base::FilePath>());
80 EXPECT_EQ(host_.get(), handler_->FindHost(profile(), extension_id_)); 80 EXPECT_EQ(host_.get(), handler_->FindHost(profile(), extension_id_));
81 81
82 // Focus the app window. 82 // Focus the app window.
83 NSWindow* window = [[NSApp windows] objectAtIndex:0]; 83 NSWindow* window = [[NSApp windows] objectAtIndex:0];
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 atStart:NO]; 119 atStart:NO];
120 120
121 // This will time out if the event above does not terminate Chrome. 121 // This will time out if the event above does not terminate Chrome.
122 content::RunMessageLoop(); 122 content::RunMessageLoop();
123 123
124 EXPECT_FALSE(handler_->FindHost(profile(), extension_id_)); 124 EXPECT_FALSE(handler_->FindHost(profile(), extension_id_));
125 EXPECT_TRUE(browser_shutdown::IsTryingToQuit()); 125 EXPECT_TRUE(browser_shutdown::IsTryingToQuit());
126 } 126 }
127 127
128 } // namespace apps 128 } // namespace apps
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/background/background_application_list_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698