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

Side by Side Diff: chrome/browser/extensions/api/downloads/downloads_api_unittest.cc

Issue 12494028: Move Requirements out of Extension Class (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Move Requirements from API Created 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/chrome_manifest_parser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 event_router()->RemoveEventListener( 279 event_router()->RemoveEventListener(
280 extensions::event_names::kOnDownloadDeterminingFilename, 280 extensions::event_names::kOnDownloadDeterminingFilename,
281 host, 281 host,
282 GetExtensionId()); 282 GetExtensionId());
283 } 283 }
284 284
285 Browser* current_browser() { return current_browser_; } 285 Browser* current_browser() { return current_browser_; }
286 286
287 // InProcessBrowserTest 287 // InProcessBrowserTest
288 virtual void SetUpOnMainThread() OVERRIDE { 288 virtual void SetUpOnMainThread() OVERRIDE {
289 ExtensionApiTest::SetUpOnMainThread();
289 BrowserThread::PostTask( 290 BrowserThread::PostTask(
290 BrowserThread::IO, FROM_HERE, 291 BrowserThread::IO, FROM_HERE,
291 base::Bind(&chrome_browser_net::SetUrlRequestMocksEnabled, true)); 292 base::Bind(&chrome_browser_net::SetUrlRequestMocksEnabled, true));
292 InProcessBrowserTest::SetUpOnMainThread(); 293 InProcessBrowserTest::SetUpOnMainThread();
293 GoOnTheRecord(); 294 GoOnTheRecord();
294 CreateAndSetDownloadsDirectory(); 295 CreateAndSetDownloadsDirectory();
295 current_browser()->profile()->GetPrefs()->SetBoolean( 296 current_browser()->profile()->GetPrefs()->SetBoolean(
296 prefs::kPromptForDownload, false); 297 prefs::kPromptForDownload, false);
297 GetOnRecordManager()->RemoveAllDownloads(); 298 GetOnRecordManager()->RemoveAllDownloads();
298 events_listener_.reset(new DownloadsEventsListener()); 299 events_listener_.reset(new DownloadsEventsListener());
(...skipping 2895 matching lines...) Expand 10 before | Expand all | Expand 10 after
3194 ASSERT_TRUE(WaitFor(events::kOnDownloadChanged, 3195 ASSERT_TRUE(WaitFor(events::kOnDownloadChanged,
3195 base::StringPrintf("[{\"id\": %d," 3196 base::StringPrintf("[{\"id\": %d,"
3196 " \"state\": {" 3197 " \"state\": {"
3197 " \"previous\": \"in_progress\"," 3198 " \"previous\": \"in_progress\","
3198 " \"current\": \"complete\"}}]", 3199 " \"current\": \"complete\"}}]",
3199 result_id))); 3200 result_id)));
3200 } 3201 }
3201 3202
3202 // TODO(benjhayden) Figure out why DisableExtension() does not fire 3203 // TODO(benjhayden) Figure out why DisableExtension() does not fire
3203 // OnListenerRemoved. 3204 // OnListenerRemoved.
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/chrome_manifest_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698