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

Side by Side Diff: chrome/browser/extensions/lazy_background_page_apitest.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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/scoped_observer.h" 8 #include "base/scoped_observer.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 10 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 379
380 // Lazy Background Page has been shut down. 380 // Lazy Background Page has been shut down.
381 EXPECT_FALSE(IsBackgroundPageAlive(last_loaded_extension_id())); 381 EXPECT_FALSE(IsBackgroundPageAlive(last_loaded_extension_id()));
382 } 382 }
383 383
384 // Tests that an incognito split mode extension gets 2 lazy background pages, 384 // Tests that an incognito split mode extension gets 2 lazy background pages,
385 // and they each load and unload at the proper times. 385 // and they each load and unload at the proper times.
386 // See crbug.com/248437 386 // See crbug.com/248437
387 IN_PROC_BROWSER_TEST_F(LazyBackgroundPageApiTest, DISABLED_IncognitoSplitMode) { 387 IN_PROC_BROWSER_TEST_F(LazyBackgroundPageApiTest, DISABLED_IncognitoSplitMode) {
388 // Open incognito window. 388 // Open incognito window.
389 Browser* incognito_browser = ui_test_utils::OpenURLOffTheRecord( 389 Browser* incognito_browser =
390 browser()->profile(), GURL("about:blank")); 390 OpenURLOffTheRecord(browser()->profile(), GURL("about:blank"));
391 391
392 // Load the extension with incognito enabled. 392 // Load the extension with incognito enabled.
393 { 393 {
394 LoadedIncognitoObserver loaded(browser()->profile()); 394 LoadedIncognitoObserver loaded(browser()->profile());
395 base::FilePath extdir = test_data_dir_.AppendASCII("lazy_background_page"). 395 base::FilePath extdir = test_data_dir_.AppendASCII("lazy_background_page").
396 AppendASCII("incognito_split"); 396 AppendASCII("incognito_split");
397 ASSERT_TRUE(LoadExtensionIncognito(extdir)); 397 ASSERT_TRUE(LoadExtensionIncognito(extdir));
398 loaded.Wait(); 398 loaded.Wait();
399 } 399 }
400 400
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 623
624 // Tests that the lazy background page will be unloaded if the onSuspend event 624 // Tests that the lazy background page will be unloaded if the onSuspend event
625 // handler calls an API function such as chrome.storage.local.set(). 625 // handler calls an API function such as chrome.storage.local.set().
626 // See: http://crbug.com/296834 626 // See: http://crbug.com/296834
627 IN_PROC_BROWSER_TEST_F(LazyBackgroundPageApiTest, OnSuspendUseStorageApi) { 627 IN_PROC_BROWSER_TEST_F(LazyBackgroundPageApiTest, OnSuspendUseStorageApi) {
628 EXPECT_TRUE(LoadExtensionAndWait("on_suspend")); 628 EXPECT_TRUE(LoadExtensionAndWait("on_suspend"));
629 } 629 }
630 630
631 // TODO: background page with timer. 631 // TODO: background page with timer.
632 // TODO: background page that interacts with popup. 632 // TODO: background page that interacts with popup.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698