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

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

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 2 Created 8 years, 7 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 <sstream> 5 #include <sstream>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 #include "net/base/net_util.h" 62 #include "net/base/net_util.h"
63 #include "net/test/test_server.h" 63 #include "net/test/test_server.h"
64 #include "testing/gtest/include/gtest/gtest.h" 64 #include "testing/gtest/include/gtest/gtest.h"
65 65
66 using content::BrowserThread; 66 using content::BrowserThread;
67 using content::DownloadItem; 67 using content::DownloadItem;
68 using content::DownloadManager; 68 using content::DownloadManager;
69 using content::DownloadPersistentStoreInfo; 69 using content::DownloadPersistentStoreInfo;
70 using content::DownloadUrlParameters; 70 using content::DownloadUrlParameters;
71 using content::WebContents; 71 using content::WebContents;
72 using extensions::Extension;
72 73
73 namespace { 74 namespace {
74 75
75 // IDs and paths of CRX files used in tests. 76 // IDs and paths of CRX files used in tests.
76 const char kGoodCrxId[] = "ldnnhddmnhbkjipkidpdiheffobcpfmf"; 77 const char kGoodCrxId[] = "ldnnhddmnhbkjipkidpdiheffobcpfmf";
77 const FilePath kGoodCrxPath(FILE_PATH_LITERAL("extensions/good.crx")); 78 const FilePath kGoodCrxPath(FILE_PATH_LITERAL("extensions/good.crx"));
78 79
79 const char kLargeThemeCrxId[] = "pjpgmfcmabopnnfonnhmdjglfpjjfkbf"; 80 const char kLargeThemeCrxId[] = "pjpgmfcmabopnnfonnhmdjglfpjjfkbf";
80 const FilePath kLargeThemePath(FILE_PATH_LITERAL("extensions/theme2.crx")); 81 const FilePath kLargeThemePath(FILE_PATH_LITERAL("extensions/theme2.crx"));
81 82
(...skipping 2361 matching lines...) Expand 10 before | Expand all | Expand 10 after
2443 GetDownloads(browser(), &download_items); 2444 GetDownloads(browser(), &download_items);
2444 ASSERT_EQ(1u, download_items.size()); 2445 ASSERT_EQ(1u, download_items.size());
2445 ASSERT_EQ(test_server()->GetURL("echoheader?Referer"), 2446 ASSERT_EQ(test_server()->GetURL("echoheader?Referer"),
2446 download_items[0]->GetOriginalUrl()); 2447 download_items[0]->GetOriginalUrl());
2447 2448
2448 // Check that the file contains the expected referrer. 2449 // Check that the file contains the expected referrer.
2449 FilePath file(download_items[0]->GetFullPath()); 2450 FilePath file(download_items[0]->GetFullPath());
2450 std::string expected_contents = test_server()->GetURL("").spec(); 2451 std::string expected_contents = test_server()->GetURL("").spec();
2451 ASSERT_TRUE(VerifyFile(file, expected_contents, expected_contents.length())); 2452 ASSERT_TRUE(VerifyFile(file, expected_contents, expected_contents.length()));
2452 } 2453 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698