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

Side by Side Diff: chrome/browser/infobars/infobars_browsertest.cc

Issue 2799003002: Unpack theme data from extensions off of UI thread. (Closed)
Patch Set: fix gtk case 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 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 <utility> 5 #include <utility>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/extensions/crx_installer.h" 10 #include "chrome/browser/extensions/crx_installer.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 browser(), embedded_test_server()->GetURL("/simple.html"), 69 browser(), embedded_test_server()->GetURL("/simple.html"),
70 WindowOpenDisposition::NEW_FOREGROUND_TAB, 70 WindowOpenDisposition::NEW_FOREGROUND_TAB,
71 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); 71 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
72 content::WindowedNotificationObserver infobar_added_2( 72 content::WindowedNotificationObserver infobar_added_2(
73 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED, 73 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED,
74 content::NotificationService::AllSources()); 74 content::NotificationService::AllSources());
75 content::WindowedNotificationObserver infobar_removed_1( 75 content::WindowedNotificationObserver infobar_removed_1(
76 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, 76 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED,
77 content::NotificationService::AllSources()); 77 content::NotificationService::AllSources());
78 InstallExtension("theme2.crx"); 78 InstallExtension("theme2.crx");
79 infobar_removed_1.Wait();
79 infobar_added_2.Wait(); 80 infobar_added_2.Wait();
80 infobar_removed_1.Wait();
81 EXPECT_EQ( 81 EXPECT_EQ(
82 0u, 82 0u,
83 InfoBarService::FromWebContents( 83 InfoBarService::FromWebContents(
84 browser()->tab_strip_model()->GetWebContentsAt(0))->infobar_count()); 84 browser()->tab_strip_model()->GetWebContentsAt(0))->infobar_count());
85 85
86 content::WindowedNotificationObserver infobar_removed_2( 86 content::WindowedNotificationObserver infobar_removed_2(
87 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, 87 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED,
88 content::NotificationService::AllSources()); 88 content::NotificationService::AllSources());
89 ThemeServiceFactory::GetForProfile(browser()->profile())->UseDefaultTheme(); 89 ThemeServiceFactory::GetForProfile(browser()->profile())->UseDefaultTheme();
90 infobar_removed_2.Wait(); 90 infobar_removed_2.Wait();
91 EXPECT_EQ(0u, 91 EXPECT_EQ(0u,
92 InfoBarService::FromWebContents( 92 InfoBarService::FromWebContents(
93 browser()->tab_strip_model()->GetActiveWebContents())-> 93 browser()->tab_strip_model()->GetActiveWebContents())->
94 infobar_count()); 94 infobar_count());
95 } 95 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698