blob: 45922cb8ea23e623de67b9f7d22497df7e9a08e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
class DownloadsApiTest : public ExtensionApiTest {
public:
void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
ExtensionApiTest::SetUpCommandLine(command_line);
command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis);
}
void SetUpTempDownloadsDir() {
ASSERT_TRUE(tmpdir.CreateUniqueTempDir());
browser()->profile()->GetPrefs()->SetFilePath(
prefs::kDownloadDefaultDirectory, tmpdir.path());
}
private:
ScopedTempDir tmpdir;
};
// http://crbug.com/101170
IN_PROC_BROWSER_TEST_F(DownloadsApiTest, DISABLED_DownloadsApiTest) {
SetUpTempDownloadsDir();
ASSERT_TRUE(StartTestServer());
ASSERT_TRUE(RunExtensionTest("downloads")) << message_;
}
|