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

Side by Side Diff: chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc

Issue 2835233002: Fix integration tests in src/chrome and src/extensions so that we can turn on IO thread checks wi... (Closed)
Patch Set: ready for review Created 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/file_manager/file_manager_browsertest_base.h" 5 #include "chrome/browser/chromeos/file_manager/file_manager_browsertest_base.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <deque> 9 #include <deque>
10 10
11 #include "base/json/json_reader.h" 11 #include "base/json/json_reader.h"
12 #include "base/json/json_value_converter.h" 12 #include "base/json/json_value_converter.h"
13 #include "base/json/json_writer.h" 13 #include "base/json/json_writer.h"
14 #include "base/path_service.h" 14 #include "base/path_service.h"
15 #include "base/run_loop.h" 15 #include "base/run_loop.h"
16 #include "base/strings/string_piece.h" 16 #include "base/strings/string_piece.h"
17 #include "base/threading/thread_restrictions.h"
17 #include "base/time/time.h" 18 #include "base/time/time.h"
18 #include "chrome/browser/browser_process.h" 19 #include "chrome/browser/browser_process.h"
19 #include "chrome/browser/chromeos/drive/file_system_util.h" 20 #include "chrome/browser/chromeos/drive/file_system_util.h"
20 #include "chrome/browser/chromeos/file_manager/app_id.h" 21 #include "chrome/browser/chromeos/file_manager/app_id.h"
21 #include "chrome/browser/chromeos/file_manager/mount_test_util.h" 22 #include "chrome/browser/chromeos/file_manager/mount_test_util.h"
22 #include "chrome/browser/chromeos/file_manager/path_util.h" 23 #include "chrome/browser/chromeos/file_manager/path_util.h"
23 #include "chrome/browser/chromeos/file_manager/volume_manager.h" 24 #include "chrome/browser/chromeos/file_manager/volume_manager.h"
24 #include "chrome/browser/chromeos/profiles/profile_helper.h" 25 #include "chrome/browser/chromeos/profiles/profile_helper.h"
25 #include "chrome/browser/extensions/component_loader.h" 26 #include "chrome/browser/extensions/component_loader.h"
26 #include "chrome/browser/extensions/extension_service.h" 27 #include "chrome/browser/extensions/extension_service.h"
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 if (HasFatalFailure()) 618 if (HasFatalFailure())
618 break; 619 break;
619 620
620 entry.function->Reply(output); 621 entry.function->Reply(output);
621 } 622 }
622 } 623 }
623 624
624 void FileManagerBrowserTestBase::OnMessage(const std::string& name, 625 void FileManagerBrowserTestBase::OnMessage(const std::string& name,
625 const base::DictionaryValue& value, 626 const base::DictionaryValue& value,
626 std::string* output) { 627 std::string* output) {
628 base::ThreadRestrictions::ScopedAllowIO allow_io;
627 if (name == "getTestName") { 629 if (name == "getTestName") {
628 // Pass the test case name. 630 // Pass the test case name.
629 *output = GetTestCaseNameParam(); 631 *output = GetTestCaseNameParam();
630 return; 632 return;
631 } 633 }
632 634
633 if (name == "getRootPaths") { 635 if (name == "getRootPaths") {
634 // Pass the root paths. 636 // Pass the root paths.
635 base::DictionaryValue res; 637 base::DictionaryValue res;
636 res.SetString("downloads", 638 res.SetString("downloads",
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 } 753 }
752 754
753 drive::DriveIntegrationService* 755 drive::DriveIntegrationService*
754 FileManagerBrowserTestBase::CreateDriveIntegrationService(Profile* profile) { 756 FileManagerBrowserTestBase::CreateDriveIntegrationService(Profile* profile) {
755 drive_volumes_[profile->GetOriginalProfile()].reset(new DriveTestVolume()); 757 drive_volumes_[profile->GetOriginalProfile()].reset(new DriveTestVolume());
756 return drive_volumes_[profile->GetOriginalProfile()] 758 return drive_volumes_[profile->GetOriginalProfile()]
757 ->CreateDriveIntegrationService(profile); 759 ->CreateDriveIntegrationService(profile);
758 } 760 }
759 761
760 } // namespace file_manager 762 } // namespace file_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698