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

Side by Side Diff: chrome/browser/ui/ash/system_tray_tray_cast_browsertest_chromeos.cc

Issue 2041233005: Moves ash::user::LoginStatus to ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 4 years, 6 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
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_chromeos_browsertest_chromeos.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ash/shell.h" 5 #include "ash/shell.h"
6 #include "ash/system/cast/tray_cast.h" 6 #include "ash/system/cast/tray_cast.h"
7 #include "ash/system/tray/system_tray.h" 7 #include "ash/system/tray/system_tray.h"
8 #include "ash/system/tray/system_tray_delegate.h" 8 #include "ash/system/tray/system_tray_delegate.h"
9 #include "ash/system/tray/system_tray_item.h" 9 #include "ash/system/tray/system_tray_item.h"
10 #include "ash/test/tray_cast_test_api.h" 10 #include "ash/test/tray_cast_test_api.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // called with the same id. This automatically creates/destroys the detail view 65 // called with the same id. This automatically creates/destroys the detail view
66 // and notifies the tray that Chrome has begun casting. 66 // and notifies the tray that Chrome has begun casting.
67 bool StartCastWithVerification(const extensions::Extension* extension, 67 bool StartCastWithVerification(const extensions::Extension* extension,
68 ash::TrayCast* tray, 68 ash::TrayCast* tray,
69 const std::string& receiver_id) { 69 const std::string& receiver_id) {
70 ash::SystemTrayItem* system_tray_item = tray; 70 ash::SystemTrayItem* system_tray_item = tray;
71 ash::TrayCastTestAPI test_tray(tray); 71 ash::TrayCastTestAPI test_tray(tray);
72 72
73 // We will simulate a button click in the detail view to begin the cast, so we 73 // We will simulate a button click in the detail view to begin the cast, so we
74 // need to make a detail view available. 74 // need to make a detail view available.
75 std::unique_ptr<views::View> detailed_view = 75 std::unique_ptr<views::View> detailed_view = base::WrapUnique(
76 base::WrapUnique(system_tray_item->CreateDetailedView( 76 system_tray_item->CreateDetailedView(ash::LoginStatus::USER));
77 ash::user::LoginStatus::LOGGED_IN_USER));
78 77
79 // Clear out any old state and execute any pending JS calls created from the 78 // Clear out any old state and execute any pending JS calls created from the
80 // CreateDetailedView call. 79 // CreateDetailedView call.
81 ExecuteJavaScript(extension, "launchDesktopMirroringReceiverId = ''"); 80 ExecuteJavaScript(extension, "launchDesktopMirroringReceiverId = ''");
82 81
83 // Tell the tray item that Chrome has started casting. 82 // Tell the tray item that Chrome has started casting.
84 test_tray.StartCast(receiver_id); 83 test_tray.StartCast(receiver_id);
85 test_tray.OnCastingSessionStartedOrStopped(true); 84 test_tray.OnCastingSessionStartedOrStopped(true);
86 85
87 system_tray_item->DestroyDetailedView(); 86 system_tray_item->DestroyDetailedView();
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 cast_config_delegate->LaunchCastOptions(); 289 cast_config_delegate->LaunchCastOptions();
291 290
292 const GURL url = 291 const GURL url =
293 browser()->tab_strip_model()->GetActiveWebContents()->GetURL(); 292 browser()->tab_strip_model()->GetActiveWebContents()->GetURL();
294 EXPECT_TRUE(base::StringPiece(url.GetContent()).ends_with("options.html")); 293 EXPECT_TRUE(base::StringPiece(url.GetContent()).ends_with("options.html"));
295 294
296 UninstallExtension(extension->id()); 295 UninstallExtension(extension->id());
297 } 296 }
298 297
299 } // namespace chromeos 298 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_chromeos_browsertest_chromeos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698