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

Unified Diff: chrome/browser/extensions/lazy_background_page_apitest.cc

Issue 2931243002: Unframe chrome://extensions as it's the last (and only) uber item (Closed)
Patch Set: cros tests Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/lazy_background_page_apitest.cc
diff --git a/chrome/browser/extensions/lazy_background_page_apitest.cc b/chrome/browser/extensions/lazy_background_page_apitest.cc
index f6599d6119bc2c4f66826dc38f7552653799909e..439f3a2118d7abb7b2fd7da1c85c4782595310ea 100644
--- a/chrome/browser/extensions/lazy_background_page_apitest.cc
+++ b/chrome/browser/extensions/lazy_background_page_apitest.cc
@@ -571,6 +571,7 @@ IN_PROC_BROWSER_TEST_F(LazyBackgroundPageApiTest, EventDispatchToTab) {
// when it is destroyed.
IN_PROC_BROWSER_TEST_F(LazyBackgroundPageApiTest, UpdateExtensionsPage) {
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIExtensionsURL));
+ auto* extensions_frame = browser()->tab_strip_model()->GetActiveWebContents();
Devlin 2017/06/13 18:04:21 this is a bit awkward - it's not a frame any more.
Dan Beam 2017/06/13 18:15:16 Done.
ResultCatcher catcher;
base::FilePath extdir = test_data_dir_.AppendASCII("lazy_background_page").
@@ -597,13 +598,6 @@ IN_PROC_BROWSER_TEST_F(LazyBackgroundPageApiTest, UpdateExtensionsPage) {
// Lazy Background Page has been shut down.
EXPECT_FALSE(IsBackgroundPageAlive(last_loaded_extension_id()));
- // Verify that extensions page shows that the lazy background page is
- // inactive.
- content::RenderFrameHost* frame = content::FrameMatchingPredicate(
- browser()->tab_strip_model()->GetActiveWebContents(),
- base::Bind(&content::FrameHasSourceUrl,
- GURL(chrome::kChromeUIExtensionsFrameURL)));
-
// Updating the extensions page is a process that has back-and-forth
// communication (i.e., backend tells extensions page something changed,
// extensions page requests updated data, backend responds with updated data,
@@ -616,7 +610,7 @@ IN_PROC_BROWSER_TEST_F(LazyBackgroundPageApiTest, UpdateExtensionsPage) {
int num_tries = 0;
while (!is_inactive && num_tries++ < kMaxTries) {
EXPECT_TRUE(content::ExecuteScriptAndExtractBool(
- frame,
+ extensions_frame,
"var ele = document.querySelectorAll('div.active-views');"
"window.domAutomationController.send("
" ele[0].innerHTML.search('(Inactive)') > 0);",

Powered by Google App Engine
This is Rietveld 408576698