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

Side by Side Diff: chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc

Issue 10797017: base: Make ScopedVector::clear() destroy elements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update location_bar_view_mac.mm Created 8 years, 5 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 | Annotate | Revision Log
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 <set> 5 #include <set>
6 #include <string> 6 #include <string>
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 } 236 }
237 237
238 void GeolocationPermissionContextTests::SetUp() { 238 void GeolocationPermissionContextTests::SetUp() {
239 db_thread_.Start(); 239 db_thread_.Start();
240 TabContentsTestHarness::SetUp(); 240 TabContentsTestHarness::SetUp();
241 geolocation_permission_context_ = 241 geolocation_permission_context_ =
242 new ChromeGeolocationPermissionContext(profile()); 242 new ChromeGeolocationPermissionContext(profile());
243 } 243 }
244 244
245 void GeolocationPermissionContextTests::TearDown() { 245 void GeolocationPermissionContextTests::TearDown() {
246 extra_tabs_.reset(); 246 extra_tabs_.clear();
247 TabContentsTestHarness::TearDown(); 247 TabContentsTestHarness::TearDown();
248 // Schedule another task on the DB thread to notify us that it's safe to 248 // Schedule another task on the DB thread to notify us that it's safe to
249 // carry on with the test. 249 // carry on with the test.
250 base::WaitableEvent done(false, false); 250 base::WaitableEvent done(false, false);
251 BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, 251 BrowserThread::PostTask(BrowserThread::DB, FROM_HERE,
252 base::Bind(&base::WaitableEvent::Signal, base::Unretained(&done))); 252 base::Bind(&base::WaitableEvent::Signal, base::Unretained(&done)));
253 done.Wait(); 253 done.Wait();
254 db_thread_.Stop(); 254 db_thread_.Stop();
255 } 255 }
256 256
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 ASSERT_FALSE(infobar_0->ShouldExpire(details)); 634 ASSERT_FALSE(infobar_0->ShouldExpire(details));
635 // Commit the "GoBack()" above, and ensure the infobar is now expired. 635 // Commit the "GoBack()" above, and ensure the infobar is now expired.
636 WebContentsTester::For(contents())->CommitPendingNavigation(); 636 WebContentsTester::For(contents())->CommitPendingNavigation();
637 details.entry = contents()->GetController().GetLastCommittedEntry(); 637 details.entry = contents()->GetController().GetLastCommittedEntry();
638 ASSERT_TRUE(infobar_0->ShouldExpire(details)); 638 ASSERT_TRUE(infobar_0->ShouldExpire(details));
639 639
640 // Delete the tab contents. 640 // Delete the tab contents.
641 DeleteContents(); 641 DeleteContents();
642 infobar_0->InfoBarClosed(); 642 infobar_0->InfoBarClosed();
643 } 643 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/personal_data_manager_mac.mm ('k') | chrome/browser/instant/instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698