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

Side by Side Diff: chrome/browser/extensions/api/file_system/file_system_api_unittest.cc

Issue 1865133002: kiosk: Fix kiosk session restart (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: restore "PublicAccounts" local state Created 4 years, 8 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
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/extensions/api/file_system/file_system_api.h" 5 #include "chrome/browser/extensions/api/file_system/file_system_api.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 391
392 // Non-component apps in manual-launch kiosk mode will be granted access after 392 // Non-component apps in manual-launch kiosk mode will be granted access after
393 // receiving approval from the user. 393 // receiving approval from the user.
394 scoped_refptr<Extension> manual_launch_kiosk_app( 394 scoped_refptr<Extension> manual_launch_kiosk_app(
395 test_util::BuildApp(ExtensionBuilder()) 395 test_util::BuildApp(ExtensionBuilder())
396 .MergeManifest(DictionaryBuilder() 396 .MergeManifest(DictionaryBuilder()
397 .SetBoolean("kiosk_enabled", true) 397 .SetBoolean("kiosk_enabled", true)
398 .SetBoolean("kiosk_only", true) 398 .SetBoolean("kiosk_only", true)
399 .Build()) 399 .Build())
400 .Build()); 400 .Build());
401 user_manager_->KioskAppLoggedIn( 401 user_manager::User* manual_kiosk_app_user = user_manager_->AddKioskAppUser(
bartfab (slow) 2016/04/12 15:08:13 Nit 1: const pointer. Nit 2: #include "components/
xiyuan 2016/04/12 16:22:51 Done.
402 AccountId::FromUserEmail(manual_launch_kiosk_app->id())); 402 AccountId::FromUserEmail(manual_launch_kiosk_app->id()));
403 user_manager_->KioskAppLoggedIn(manual_kiosk_app_user);
403 { 404 {
404 TestingConsentProviderDelegate delegate; 405 TestingConsentProviderDelegate delegate;
405 delegate.SetDialogButton(ui::DIALOG_BUTTON_OK); 406 delegate.SetDialogButton(ui::DIALOG_BUTTON_OK);
406 ConsentProvider provider(&delegate); 407 ConsentProvider provider(&delegate);
407 EXPECT_TRUE(provider.IsGrantable(*manual_launch_kiosk_app)); 408 EXPECT_TRUE(provider.IsGrantable(*manual_launch_kiosk_app));
408 409
409 ConsentProvider::Consent result = ConsentProvider::CONSENT_IMPOSSIBLE; 410 ConsentProvider::Consent result = ConsentProvider::CONSENT_IMPOSSIBLE;
410 provider.RequestConsent(*manual_launch_kiosk_app.get(), volume_, 411 provider.RequestConsent(*manual_launch_kiosk_app.get(), volume_,
411 true /* writable */, 412 true /* writable */,
412 base::Bind(&OnConsentReceived, &result)); 413 base::Bind(&OnConsentReceived, &result));
(...skipping 19 matching lines...) Expand all
432 base::RunLoop().RunUntilIdle(); 433 base::RunLoop().RunUntilIdle();
433 434
434 EXPECT_EQ(1, delegate.show_dialog_counter()); 435 EXPECT_EQ(1, delegate.show_dialog_counter());
435 EXPECT_EQ(0, delegate.show_notification_counter()); 436 EXPECT_EQ(0, delegate.show_notification_counter());
436 EXPECT_EQ(ConsentProvider::CONSENT_REJECTED, result); 437 EXPECT_EQ(ConsentProvider::CONSENT_REJECTED, result);
437 } 438 }
438 } 439 }
439 #endif 440 #endif
440 441
441 } // namespace extensions 442 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698