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

Side by Side Diff: chrome/browser/chromeos/login/kiosk_browsertest.cc

Issue 2522283002: Correct EmbeddedTestServer usage in chromeos tests. (Closed)
Patch Set: Correct EmbeddedTestServer usage in chromeos tests. Created 4 years 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/chromeos/policy/device_local_account_browsertest.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include <memory> 5 #include <memory>
6 #include <vector> 6 #include <vector>
7 7
8 #include "ash/common/wallpaper/wallpaper_controller.h" 8 #include "ash/common/wallpaper/wallpaper_controller.h"
9 #include "ash/common/wallpaper/wallpaper_controller_observer.h" 9 #include "ash/common/wallpaper/wallpaper_controller_observer.h"
10 #include "ash/common/wm_shell.h" 10 #include "ash/common/wm_shell.h"
(...skipping 2263 matching lines...) Expand 10 before | Expand all | Expand 10 after
2274 // Terminate the app. 2274 // Terminate the app.
2275 window->GetBaseWindow()->Close(); 2275 window->GetBaseWindow()->Close();
2276 content::RunAllPendingInMessageLoop(); 2276 content::RunAllPendingInMessageLoop();
2277 } 2277 }
2278 2278
2279 IN_PROC_BROWSER_TEST_F(KioskEnterpriseTest, PrivateStore) { 2279 IN_PROC_BROWSER_TEST_F(KioskEnterpriseTest, PrivateStore) {
2280 set_test_app_id(kTestEnterpriseKioskApp); 2280 set_test_app_id(kTestEnterpriseKioskApp);
2281 2281
2282 const char kPrivateStoreUpdate[] = "/private_store_update"; 2282 const char kPrivateStoreUpdate[] = "/private_store_update";
2283 net::EmbeddedTestServer private_server; 2283 net::EmbeddedTestServer private_server;
2284 ASSERT_TRUE(private_server.Start());
2285 2284
2286 // |private_server| serves crx from test data dir. 2285 // |private_server| serves crx from test data dir.
2287 base::FilePath test_data_dir; 2286 base::FilePath test_data_dir;
2288 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); 2287 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir);
2289 private_server.ServeFilesFromDirectory(test_data_dir); 2288 private_server.ServeFilesFromDirectory(test_data_dir);
2289 ASSERT_TRUE(private_server.InitializeAndListen());
2290 2290
2291 FakeCWS private_store; 2291 FakeCWS private_store;
2292 private_store.InitAsPrivateStore(&private_server, kPrivateStoreUpdate); 2292 private_store.InitAsPrivateStore(&private_server, kPrivateStoreUpdate);
2293 private_store.SetUpdateCrx(kTestEnterpriseKioskApp, 2293 private_store.SetUpdateCrx(kTestEnterpriseKioskApp,
2294 std::string(kTestEnterpriseKioskApp) + ".crx", 2294 std::string(kTestEnterpriseKioskApp) + ".crx",
2295 "1.0.0"); 2295 "1.0.0");
2296 2296
2297 private_server.StartAcceptingConnections();
2298
2297 // Configure kTestEnterpriseKioskApp in device policy. 2299 // Configure kTestEnterpriseKioskApp in device policy.
2298 ConfigureKioskAppInPolicy(kTestEnterpriseAccountId, 2300 ConfigureKioskAppInPolicy(kTestEnterpriseAccountId,
2299 kTestEnterpriseKioskApp, 2301 kTestEnterpriseKioskApp,
2300 private_server.GetURL(kPrivateStoreUpdate).spec()); 2302 private_server.GetURL(kPrivateStoreUpdate).spec());
2301 2303
2302 // Meta should be able to be extracted from crx before launching. 2304 // Meta should be able to be extracted from crx before launching.
2303 KioskAppManager* manager = KioskAppManager::Get(); 2305 KioskAppManager* manager = KioskAppManager::Get();
2304 AppDataLoadWaiter waiter(manager, kTestEnterpriseKioskApp, std::string()); 2306 AppDataLoadWaiter waiter(manager, kTestEnterpriseKioskApp, std::string());
2305 waiter.WaitForAppData(); 2307 waiter.WaitForAppData();
2306 2308
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
2388 content::WindowedNotificationObserver( 2390 content::WindowedNotificationObserver(
2389 chrome::NOTIFICATION_KIOSK_AUTOLAUNCH_WARNING_VISIBLE, 2391 chrome::NOTIFICATION_KIOSK_AUTOLAUNCH_WARNING_VISIBLE,
2390 content::NotificationService::AllSources()).Wait(); 2392 content::NotificationService::AllSources()).Wait();
2391 2393
2392 // Wait for the wallpaper to load. 2394 // Wait for the wallpaper to load.
2393 WaitForWallpaper(); 2395 WaitForWallpaper();
2394 EXPECT_TRUE(wallpaper_loaded()); 2396 EXPECT_TRUE(wallpaper_loaded());
2395 } 2397 }
2396 2398
2397 } // namespace chromeos 2399 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/device_local_account_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698