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

Side by Side Diff: chrome/browser/download/download_browsertest.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
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/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "content/browser/download/download_manager.h" 45 #include "content/browser/download/download_manager.h"
46 #include "content/browser/download/download_persistent_store_info.h" 46 #include "content/browser/download/download_persistent_store_info.h"
47 #include "content/browser/net/url_request_mock_http_job.h" 47 #include "content/browser/net/url_request_mock_http_job.h"
48 #include "content/browser/renderer_host/resource_dispatcher_host.h" 48 #include "content/browser/renderer_host/resource_dispatcher_host.h"
49 #include "content/browser/tab_contents/tab_contents.h" 49 #include "content/browser/tab_contents/tab_contents.h"
50 #include "content/browser/net/url_request_slow_download_job.h" 50 #include "content/browser/net/url_request_slow_download_job.h"
51 #include "content/public/common/page_transition_types.h" 51 #include "content/public/common/page_transition_types.h"
52 #include "net/base/net_util.h" 52 #include "net/base/net_util.h"
53 #include "testing/gtest/include/gtest/gtest.h" 53 #include "testing/gtest/include/gtest/gtest.h"
54 54
55 using content::BrowserThread;
56
55 namespace { 57 namespace {
56 58
57 // IDs and paths of CRX files used in tests. 59 // IDs and paths of CRX files used in tests.
58 const char kGoodCrxId[] = "ldnnhddmnhbkjipkidpdiheffobcpfmf"; 60 const char kGoodCrxId[] = "ldnnhddmnhbkjipkidpdiheffobcpfmf";
59 const FilePath kGoodCrxPath(FILE_PATH_LITERAL("extensions/good.crx")); 61 const FilePath kGoodCrxPath(FILE_PATH_LITERAL("extensions/good.crx"));
60 62
61 const char kLargeThemeCrxId[] = "pjpgmfcmabopnnfonnhmdjglfpjjfkbf"; 63 const char kLargeThemeCrxId[] = "pjpgmfcmabopnnfonnhmdjglfpjjfkbf";
62 const FilePath kLargeThemePath(FILE_PATH_LITERAL("extensions/theme2.crx")); 64 const FilePath kLargeThemePath(FILE_PATH_LITERAL("extensions/theme2.crx"));
63 65
64 // Action a test should take if a dangerous download is encountered. 66 // Action a test should take if a dangerous download is encountered.
(...skipping 1472 matching lines...) Expand 10 before | Expand all | Expand 10 after
1537 EXPECT_EQ(1u, observer->NumDangerousDownloadsSeen()); 1539 EXPECT_EQ(1u, observer->NumDangerousDownloadsSeen());
1538 1540
1539 // Download shelf should close. Download panel stays open on ChromeOS. 1541 // Download shelf should close. Download panel stays open on ChromeOS.
1540 CheckDownloadUI(browser(), false, true, FilePath()); 1542 CheckDownloadUI(browser(), false, true, FilePath());
1541 1543
1542 // Check that the extension was installed. 1544 // Check that the extension was installed.
1543 ExtensionService* extension_service = 1545 ExtensionService* extension_service =
1544 browser()->profile()->GetExtensionService(); 1546 browser()->profile()->GetExtensionService();
1545 ASSERT_TRUE(extension_service->GetExtensionById(kLargeThemeCrxId, false)); 1547 ASSERT_TRUE(extension_service->GetExtensionById(kLargeThemeCrxId, false));
1546 } 1548 }
OLDNEW
« no previous file with comments | « chrome/browser/download/chrome_download_manager_delegate.cc ('k') | chrome/browser/download/download_crx_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698