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

Unified Diff: chrome/browser/prefs/pref_service_browsertest.cc

Issue 10832106: Allow writing browser_tests that involve a restart. The way to do this: (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | chrome/test/base/in_process_browser_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/pref_service_browsertest.cc
===================================================================
--- chrome/browser/prefs/pref_service_browsertest.cc (revision 150055)
+++ chrome/browser/prefs/pref_service_browsertest.cc (working copy)
@@ -23,6 +23,26 @@
#include "chrome/test/base/ui_test_utils.h"
#include "ui/gfx/rect.h"
+// On GTK, resizing happens asynchronously and we currently don't have a way to
+// get called back (it's probably possible, but we don't have that code). Since
+// the GTK code is going away, not spending more time on this.
+#if !defined(TOOLKIT_GTK)
+
+typedef InProcessBrowserTest PreservedWindowPlacement;
+
+IN_PROC_BROWSER_TEST_F(PreservedWindowPlacement, PRE_Test) {
+ browser()->window()->SetBounds(gfx::Rect(20, 30, 400, 500));
+}
+
+IN_PROC_BROWSER_TEST_F(PreservedWindowPlacement, Test) {
+ gfx::Rect bounds = browser()->window()->GetBounds();
+
+ gfx::Rect expected_bounds(gfx::Rect(20, 30, 400, 500));
+ ASSERT_EQ(expected_bounds, bounds);
+}
+
+#endif // defined(TOOLKIT_GTK)
+
class PreferenceServiceTest : public InProcessBrowserTest {
public:
explicit PreferenceServiceTest(bool new_profile) : new_profile_(new_profile) {
« no previous file with comments | « no previous file | chrome/test/base/in_process_browser_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698