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

Unified Diff: chrome/browser/chromeos/display/quirks_browsertest.cc

Issue 1775023002: Enterprise policy to prevent queries to the Quirks Server (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix display unit test Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/display/quirks_browsertest.cc
diff --git a/chrome/browser/chromeos/display/quirks_browsertest.cc b/chrome/browser/chromeos/display/quirks_browsertest.cc
index 93f86b8188efa6e78dc23f553407f8582ae96852..60ea7af13d3cc444bee421b7ce30840752262863 100644
--- a/chrome/browser/chromeos/display/quirks_browsertest.cc
+++ b/chrome/browser/chromeos/display/quirks_browsertest.cc
@@ -56,21 +56,6 @@ class QuirksBrowserTest : public InProcessBrowserTest {
protected:
~QuirksBrowserTest() override = default;
- void Initialize() {
- // NOTE: QuirksManager::Initialize() isn't necessary here, since it'll be
- // called in ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun().
-
- // Create display_profiles subdirectory under temp profile directory.
- const base::FilePath path =
- QuirksManager::Get()->delegate()->GetDownloadDisplayProfileDirectory();
- base::File::Error error = base::File::FILE_OK;
- bool created = base::CreateDirectoryAndGetError(path, &error);
- ASSERT_TRUE(created);
-
- // Quirks clients can't run until after login.
- quirks::QuirksManager::Get()->OnLoginCompleted();
- }
-
// Query QuirksManager for icc file, then run msg loop to wait for callback.
// |find_fake_file| indicates that URLFetcher should respond with success.
void TestQuirksClient(int64_t product_id, bool find_fake_file) {
@@ -102,7 +87,20 @@ class QuirksBrowserTest : public InProcessBrowserTest {
command_line->AppendSwitch(switches::kEnableQuirksClient);
}
- void SetUpOnMainThread() override { Initialize(); }
+ void SetUpOnMainThread() override {
+ // NOTE: QuirksManager::Initialize() isn't necessary here, since it'll be
+ // called in ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun().
+
+ // Create display_profiles subdirectory under temp profile directory.
+ const base::FilePath path =
+ QuirksManager::Get()->delegate()->GetDownloadDisplayProfileDirectory();
+ base::File::Error error = base::File::FILE_OK;
+ bool created = base::CreateDirectoryAndGetError(path, &error);
+ ASSERT_TRUE(created);
+
+ // Quirks clients can't run until after login.
+ quirks::QuirksManager::Get()->OnLoginCompleted();
+ }
base::Closure end_message_loop_; // Callback to terminate message loop.
base::FilePath icc_path_; // Path to icc file if found or downloaded.

Powered by Google App Engine
This is Rietveld 408576698