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

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

Issue 1225093003: mac: Flush the autorelease pool after making a browser window in browser tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@browser_test_base
Patch Set: Comments from jhawkins, round two. Created 5 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
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 <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 284
285 bool GeolocationBrowserTest::Initialize(InitializationOptions options) { 285 bool GeolocationBrowserTest::Initialize(InitializationOptions options) {
286 if (!embedded_test_server()->Started() && 286 if (!embedded_test_server()->Started() &&
287 !embedded_test_server()->InitializeAndWaitUntilReady()) { 287 !embedded_test_server()->InitializeAndWaitUntilReady()) {
288 ADD_FAILURE() << "Test server failed to start."; 288 ADD_FAILURE() << "Test server failed to start.";
289 return false; 289 return false;
290 } 290 }
291 291
292 current_url_ = embedded_test_server()->GetURL(html_for_tests_); 292 current_url_ = embedded_test_server()->GetURL(html_for_tests_);
293 if (options == INITIALIZATION_OFFTHERECORD) { 293 if (options == INITIALIZATION_OFFTHERECORD) {
294 current_browser_ = ui_test_utils::OpenURLOffTheRecord( 294 current_browser_ = OpenURLOffTheRecord(browser()->profile(), current_url_);
295 browser()->profile(), current_url_);
296 } else { 295 } else {
297 current_browser_ = browser(); 296 current_browser_ = browser();
298 if (options == INITIALIZATION_NEWTAB) 297 if (options == INITIALIZATION_NEWTAB)
299 chrome::NewTab(current_browser_); 298 chrome::NewTab(current_browser_);
300 } 299 }
301 if (options != INITIALIZATION_OFFTHERECORD) 300 if (options != INITIALIZATION_OFFTHERECORD)
302 ui_test_utils::NavigateToURL(current_browser_, current_url_); 301 ui_test_utils::NavigateToURL(current_browser_, current_url_);
303 302
304 EXPECT_TRUE(current_browser_); 303 EXPECT_TRUE(current_browser_);
305 return !!current_browser_; 304 return !!current_browser_;
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 // Last usage has been updated. 712 // Last usage has been updated.
714 EXPECT_EQ(current_browser() 713 EXPECT_EQ(current_browser()
715 ->profile() 714 ->profile()
716 ->GetHostContentSettingsMap() 715 ->GetHostContentSettingsMap()
717 ->GetLastUsage(current_url().GetOrigin(), 716 ->GetLastUsage(current_url().GetOrigin(),
718 current_url().GetOrigin(), 717 current_url().GetOrigin(),
719 CONTENT_SETTINGS_TYPE_GEOLOCATION) 718 CONTENT_SETTINGS_TYPE_GEOLOCATION)
720 .ToDoubleT(), 719 .ToDoubleT(),
721 13); 720 13);
722 } 721 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/lazy_background_page_apitest.cc ('k') | chrome/browser/prefetch/prefetch_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698