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

Side by Side Diff: chrome/browser/extensions/api/preference/preference_apitest.cc

Issue 366813007: Removed InProcessBrowserTest::CleanUpOnMainThread() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed superfluous override. Created 6 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 "base/prefs/pref_service.h" 5 #include "base/prefs/pref_service.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/extensions/extension_apitest.h" 9 #include "chrome/browser/extensions/extension_apitest.h"
10 #include "chrome/browser/extensions/extension_test_message_listener.h" 10 #include "chrome/browser/extensions/extension_test_message_listener.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // The browser might get closed later (and therefore be destroyed), so we 74 // The browser might get closed later (and therefore be destroyed), so we
75 // save the profile. 75 // save the profile.
76 profile_ = browser()->profile(); 76 profile_ = browser()->profile();
77 77
78 // Closing the last browser window also releases a module reference. Make 78 // Closing the last browser window also releases a module reference. Make
79 // sure it's not the last one, so the message loop doesn't quit 79 // sure it's not the last one, so the message loop doesn't quit
80 // unexpectedly. 80 // unexpectedly.
81 g_browser_process->AddRefModule(); 81 g_browser_process->AddRefModule();
82 } 82 }
83 83
84 virtual void CleanUpOnMainThread() OVERRIDE { 84 virtual void TearDownOnMainThread() OVERRIDE {
85 // ReleaseBrowserProcessModule() needs to be called in a message loop, so we 85 // ReleaseBrowserProcessModule() needs to be called in a message loop, so we
86 // post a task to do it, then run the message loop. 86 // post a task to do it, then run the message loop.
87 base::MessageLoop::current()->PostTask( 87 base::MessageLoop::current()->PostTask(
88 FROM_HERE, base::Bind(&ReleaseBrowserProcessModule)); 88 FROM_HERE, base::Bind(&ReleaseBrowserProcessModule));
89 content::RunAllPendingInMessageLoop(); 89 content::RunAllPendingInMessageLoop();
90 90
91 ExtensionApiTest::CleanUpOnMainThread(); 91 ExtensionApiTest::TearDownOnMainThread();
92 } 92 }
93 93
94 Profile* profile_; 94 Profile* profile_;
95 }; 95 };
96 96
97 // http://crbug.com/177163 97 // http://crbug.com/177163
98 #if defined(OS_WIN) && !defined(NDEBUG) 98 #if defined(OS_WIN) && !defined(NDEBUG)
99 #define MAYBE_Standard DISABLED_Standard 99 #define MAYBE_Standard DISABLED_Standard
100 #else 100 #else
101 #define MAYBE_Standard Standard 101 #define MAYBE_Standard Standard
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 317
318 // Test 6 - clearDefault 318 // Test 6 - clearDefault
319 EXPECT_TRUE(listener10.WaitUntilSatisfied()); // Regular ready 319 EXPECT_TRUE(listener10.WaitUntilSatisfied()); // Regular ready
320 EXPECT_TRUE(listener_incognito10.WaitUntilSatisfied()); // Incognito ready 320 EXPECT_TRUE(listener_incognito10.WaitUntilSatisfied()); // Incognito ready
321 listener10.Reply("ok"); 321 listener10.Reply("ok");
322 listener_incognito10.Reply("ok"); 322 listener_incognito10.Reply("ok");
323 323
324 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); 324 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
325 EXPECT_TRUE(catcher_incognito.GetNextResult()) << catcher.message(); 325 EXPECT_TRUE(catcher_incognito.GetNextResult()) << catcher.message();
326 } 326 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698