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

Side by Side Diff: chrome/browser/policy/policy_browsertest.cc

Issue 612423003: Move ExtensionCache to //extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test setup Created 6 years, 2 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 <algorithm> 5 #include <algorithm>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 CommandLine::ForCurrentProcess()->AppendSwitch("noerrdialogs"); 604 CommandLine::ForCurrentProcess()->AppendSwitch("noerrdialogs");
605 EXPECT_CALL(provider_, IsInitializationComplete(_)) 605 EXPECT_CALL(provider_, IsInitializationComplete(_))
606 .WillRepeatedly(Return(true)); 606 .WillRepeatedly(Return(true));
607 BrowserPolicyConnector::SetPolicyProviderForTesting(&provider_); 607 BrowserPolicyConnector::SetPolicyProviderForTesting(&provider_);
608 } 608 }
609 609
610 virtual void SetUpOnMainThread() override { 610 virtual void SetUpOnMainThread() override {
611 BrowserThread::PostTask( 611 BrowserThread::PostTask(
612 BrowserThread::IO, FROM_HERE, 612 BrowserThread::IO, FROM_HERE,
613 base::Bind(chrome_browser_net::SetUrlRequestMocksEnabled, true)); 613 base::Bind(chrome_browser_net::SetUrlRequestMocksEnabled, true));
614 if (extension_service()->updater()) {
615 extension_service()->updater()->SetExtensionCacheForTesting(
616 test_extension_cache_.get());
617 }
614 } 618 }
615 619
616 // Makes URLRequestMockHTTPJobs serve data from content::DIR_TEST_DATA 620 // Makes URLRequestMockHTTPJobs serve data from content::DIR_TEST_DATA
617 // instead of chrome::DIR_TEST_DATA. 621 // instead of chrome::DIR_TEST_DATA.
618 void ServeContentTestData() { 622 void ServeContentTestData() {
619 base::FilePath root_http; 623 base::FilePath root_http;
620 PathService::Get(content::DIR_TEST_DATA, &root_http); 624 PathService::Get(content::DIR_TEST_DATA, &root_http);
621 BrowserThread::PostTaskAndReply( 625 BrowserThread::PostTaskAndReply(
622 BrowserThread::IO, 626 BrowserThread::IO,
623 FROM_HERE, 627 FROM_HERE,
(...skipping 2608 matching lines...) Expand 10 before | Expand all | Expand 10 after
3232 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( 3236 EXPECT_TRUE(content::ExecuteScriptAndExtractBool(
3233 browser2->tab_strip_model()->GetActiveWebContents(), 3237 browser2->tab_strip_model()->GetActiveWebContents(),
3234 "domAutomationController.send(window.showModalDialog !== undefined);", 3238 "domAutomationController.send(window.showModalDialog !== undefined);",
3235 &result)); 3239 &result));
3236 EXPECT_TRUE(result); 3240 EXPECT_TRUE(result);
3237 } 3241 }
3238 3242
3239 #endif // !defined(CHROME_OS) 3243 #endif // !defined(CHROME_OS)
3240 3244
3241 } // namespace policy 3245 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/extensions/updater/extension_updater.cc ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698