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

Side by Side Diff: chrome/browser/chromeos/customization_document_unittest.cc

Issue 236013002: Apply default wallpaper from customization manifest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Allow customization without wallpaper. Created 6 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chromeos/customization_document.h" 5 #include "chrome/browser/chromeos/customization_document.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/prefs/testing_pref_service.h" 8 #include "base/prefs/testing_pref_service.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 AddExpectedManifest(kDummyCustomizationID, kGoodServicesManifest); 316 AddExpectedManifest(kDummyCustomizationID, kGoodServicesManifest);
317 317
318 ServicesCustomizationDocument* doc = 318 ServicesCustomizationDocument* doc =
319 ServicesCustomizationDocument::GetInstance(); 319 ServicesCustomizationDocument::GetInstance();
320 EXPECT_FALSE(doc->IsReady()); 320 EXPECT_FALSE(doc->IsReady());
321 321
322 doc->StartFetching(); 322 doc->StartFetching();
323 RunUntilIdle(); 323 RunUntilIdle();
324 EXPECT_TRUE(doc->IsReady()); 324 EXPECT_TRUE(doc->IsReady());
325 325
326 EXPECT_EQ(doc->GetDefaultWallpaperUrl().spec(), 326 GURL wallpaper_url;
327 "http://somedomain.com/image.png"); 327 EXPECT_TRUE(doc->GetDefaultWallpaperUrl(&wallpaper_url));
328 EXPECT_EQ(wallpaper_url.spec(), "http://somedomain.com/image.png");
Daniel Erat 2014/04/19 14:24:08 EXPECT_EQ()'s arguments should be (expected, actua
Alexander Alekseev 2014/04/21 16:49:41 Done.
328 329
329 std::vector<std::string> default_apps; 330 std::vector<std::string> default_apps;
330 EXPECT_TRUE(doc->GetDefaultApps(&default_apps)); 331 EXPECT_TRUE(doc->GetDefaultApps(&default_apps));
331 ASSERT_EQ(default_apps.size(), 2u); 332 ASSERT_EQ(default_apps.size(), 2u);
332 333
333 EXPECT_EQ(default_apps[0], "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); 334 EXPECT_EQ(default_apps[0], "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
334 EXPECT_EQ(default_apps[1], "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"); 335 EXPECT_EQ(default_apps[1], "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
335 336
336 EXPECT_EQ(doc->GetOemAppsFolderName("en-US"), "EN-US OEM Name"); 337 EXPECT_EQ(doc->GetOemAppsFolderName("en-US"), "EN-US OEM Name");
337 EXPECT_EQ(doc->GetOemAppsFolderName("en"), "EN OEM Name"); 338 EXPECT_EQ(doc->GetOemAppsFolderName("en"), "EN OEM Name");
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 EXPECT_CALL(visitor, OnExternalExtensionUpdateUrlFound(_, _, _, _, _, _)) 470 EXPECT_CALL(visitor, OnExternalExtensionUpdateUrlFound(_, _, _, _, _, _))
470 .Times(0); 471 .Times(0);
471 EXPECT_CALL(visitor, OnExternalProviderReady(_)) 472 EXPECT_CALL(visitor, OnExternalProviderReady(_))
472 .Times(1); 473 .Times(1);
473 474
474 RunUntilIdle(); 475 RunUntilIdle();
475 EXPECT_TRUE(doc->IsReady()); 476 EXPECT_TRUE(doc->IsReady());
476 } 477 }
477 478
478 } // namespace chromeos 479 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698