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

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

Issue 10388252: Refactoring ExtenionInstallUI to abstract the Browser references. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor clean-ups Created 8 years, 7 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"
11 #include "chrome/browser/extensions/extension_apitest.h" 11 #include "chrome/browser/extensions/extension_apitest.h"
12 #include "chrome/browser/extensions/extension_function_test_utils.h" 12 #include "chrome/browser/extensions/extension_function_test_utils.h"
13 #include "chrome/browser/extensions/extension_install_dialog.h" 13 #include "chrome/browser/extensions/extension_install_dialog.h"
14 #include "chrome/browser/extensions/extension_install_ui.h" 14 #include "chrome/browser/extensions/extension_install_prompt.h"
15 #include "chrome/browser/extensions/extension_service.h" 15 #include "chrome/browser/extensions/extension_service.h"
16 #include "chrome/browser/extensions/extension_webstore_private_api.h" 16 #include "chrome/browser/extensions/extension_webstore_private_api.h"
17 #include "chrome/browser/extensions/webstore_installer.h" 17 #include "chrome/browser/extensions/webstore_installer.h"
18 #include "chrome/browser/gpu_blacklist.h" 18 #include "chrome/browser/gpu_blacklist.h"
19 #include "chrome/browser/profiles/profile.h" 19 #include "chrome/browser/profiles/profile.h"
20 #include "chrome/browser/ui/browser.h" 20 #include "chrome/browser/ui/browser.h"
21 #include "chrome/common/chrome_notification_types.h" 21 #include "chrome/common/chrome_notification_types.h"
22 #include "chrome/common/chrome_switches.h" 22 #include "chrome/common/chrome_switches.h"
23 #include "chrome/test/base/test_launcher_utils.h" 23 #include "chrome/test/base/test_launcher_utils.h"
24 #include "chrome/test/base/ui_test_utils.h" 24 #include "chrome/test/base/ui_test_utils.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 ExtensionApiTest::SetUpCommandLine(command_line); 91 ExtensionApiTest::SetUpCommandLine(command_line);
92 command_line->AppendSwitchASCII( 92 command_line->AppendSwitchASCII(
93 switches::kAppsGalleryURL, "http://www.example.com"); 93 switches::kAppsGalleryURL, "http://www.example.com");
94 } 94 }
95 95
96 void SetUpInProcessBrowserTestFixture() OVERRIDE { 96 void SetUpInProcessBrowserTestFixture() OVERRIDE {
97 // Start up the test server and get us ready for calling the install 97 // Start up the test server and get us ready for calling the install
98 // API functions. 98 // API functions.
99 host_resolver()->AddRule("www.example.com", "127.0.0.1"); 99 host_resolver()->AddRule("www.example.com", "127.0.0.1");
100 ASSERT_TRUE(test_server()->Start()); 100 ASSERT_TRUE(test_server()->Start());
101 ExtensionInstallUI::DisableFailureUIForTests(); 101 ExtensionInstallPrompt::DisableFailureUIForTests();
102 102
103 ASSERT_TRUE(tmp_.CreateUniqueTempDirUnderPath(test_data_dir_)); 103 ASSERT_TRUE(tmp_.CreateUniqueTempDirUnderPath(test_data_dir_));
104 ASSERT_TRUE(file_util::CreateDirectory(tmp_.path())); 104 ASSERT_TRUE(file_util::CreateDirectory(tmp_.path()));
105 ASSERT_TRUE(file_util::CopyDirectory( 105 ASSERT_TRUE(file_util::CopyDirectory(
106 test_data_dir_.AppendASCII("webstore_private"), 106 test_data_dir_.AppendASCII("webstore_private"),
107 tmp_.path(), 107 tmp_.path(),
108 true)); 108 true));
109 } 109 }
110 110
111 protected: 111 protected:
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 ASSERT_TRUE(blacklist->LoadGpuBlacklist( 457 ASSERT_TRUE(blacklist->LoadGpuBlacklist(
458 json_blacklist, GpuBlacklist::kAllOs)); 458 json_blacklist, GpuBlacklist::kAllOs));
459 blacklist->UpdateGpuDataManager(); 459 blacklist->UpdateGpuDataManager();
460 GpuFeatureType type = 460 GpuFeatureType type =
461 content::GpuDataManager::GetInstance()->GetGpuFeatureType(); 461 content::GpuDataManager::GetInstance()->GetGpuFeatureType();
462 EXPECT_EQ(type, content::GPU_FEATURE_TYPE_WEBGL); 462 EXPECT_EQ(type, content::GPU_FEATURE_TYPE_WEBGL);
463 463
464 bool webgl_allowed = false; 464 bool webgl_allowed = false;
465 RunTest(webgl_allowed); 465 RunTest(webgl_allowed);
466 } 466 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698