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

Side by Side Diff: chrome/browser/extensions/extension_webstore_private_apitest.cc

Issue 9959079: Remove chrome.webstorePrivate.silentlyInstall. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
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 <vector> 5 #include <vector>
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "chrome/browser/extensions/bundle_installer.h" 10 #include "chrome/browser/extensions/bundle_installer.h"
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 ASSERT_TRUE(listener.received_success()); 304 ASSERT_TRUE(listener.received_success());
305 ASSERT_EQ("iladmdjkfniedhfhcfoefgojhgaiaccc", listener.id()); 305 ASSERT_EQ("iladmdjkfniedhfhcfoefgojhgaiaccc", listener.id());
306 } 306 }
307 307
308 // Tests using the iconUrl parameter to the install function. 308 // Tests using the iconUrl parameter to the install function.
309 IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest, 309 IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest,
310 IconUrl) { 310 IconUrl) {
311 ASSERT_TRUE(RunInstallTest("icon_url.html", "extension.crx")); 311 ASSERT_TRUE(RunInstallTest("icon_url.html", "extension.crx"));
312 } 312 }
313 313
314 // Tests using silentlyInstall to install extensions.
315 IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateBundleTest, SilentlyInstall) {
316 WebstorePrivateApi::SetTrustTestIDsForTesting(true);
317
318 PackCRX("bmfoocgfinpmkmlbjhcbofejhkhlbchk", "extension1.json");
319 PackCRX("mpneghmdnmaolkljkipbhaienajcflfe", "extension2.json");
320 PackCRX("begfmnajjkbjdgmffnjaojchoncnmngg", "app2.json");
321
322 ASSERT_TRUE(RunPageTest(GetTestServerURL("silently_install.html").spec()));
323 }
324
325 // Tests successfully installing a bundle of 2 apps and 2 extensions. 314 // Tests successfully installing a bundle of 2 apps and 2 extensions.
326 IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateBundleTest, InstallBundle) { 315 IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateBundleTest, InstallBundle) {
327 extensions::BundleInstaller::SetAutoApproveForTesting(true); 316 extensions::BundleInstaller::SetAutoApproveForTesting(true);
328 317
329 PackCRX("bmfoocgfinpmkmlbjhcbofejhkhlbchk", "extension1.json"); 318 PackCRX("bmfoocgfinpmkmlbjhcbofejhkhlbchk", "extension1.json");
330 PackCRX("pkapffpjmiilhlhbibjhamlmdhfneidj", "extension2.json"); 319 PackCRX("pkapffpjmiilhlhbibjhamlmdhfneidj", "extension2.json");
331 PackCRX("begfmnajjkbjdgmffnjaojchoncnmngg", "app1.json"); 320 PackCRX("begfmnajjkbjdgmffnjaojchoncnmngg", "app1.json");
332 PackCRX("mpneghmdnmaolkljkipbhaienajcflfe", "app2.json"); 321 PackCRX("mpneghmdnmaolkljkipbhaienajcflfe", "app2.json");
333 322
334 ASSERT_TRUE(RunPageTest(GetTestServerURL("install_bundle.html").spec())); 323 ASSERT_TRUE(RunPageTest(GetTestServerURL("install_bundle.html").spec()));
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 ASSERT_TRUE(blacklist->LoadGpuBlacklist( 382 ASSERT_TRUE(blacklist->LoadGpuBlacklist(
394 json_blacklist, GpuBlacklist::kAllOs)); 383 json_blacklist, GpuBlacklist::kAllOs));
395 blacklist->UpdateGpuDataManager(); 384 blacklist->UpdateGpuDataManager();
396 GpuFeatureType type = 385 GpuFeatureType type =
397 content::GpuDataManager::GetInstance()->GetGpuFeatureType(); 386 content::GpuDataManager::GetInstance()->GetGpuFeatureType();
398 EXPECT_EQ(type, content::GPU_FEATURE_TYPE_WEBGL); 387 EXPECT_EQ(type, content::GPU_FEATURE_TYPE_WEBGL);
399 388
400 bool webgl_allowed = false; 389 bool webgl_allowed = false;
401 RunTest(webgl_allowed); 390 RunTest(webgl_allowed);
402 } 391 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_webstore_private_api.cc ('k') | chrome/common/extensions/api/webstorePrivate.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698