OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/apps/app_browsertest_util.h" | 5 #include "chrome/browser/apps/app_browsertest_util.h" |
6 #include "chrome/browser/profiles/profile.h" | 6 #include "chrome/browser/profiles/profile.h" |
7 #include "chrome/browser/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
8 #include "chrome/browser/ui/extensions/application_launch.h" | 8 #include "chrome/browser/ui/extensions/application_launch.h" |
9 #include "content/public/browser/notification_service.h" | 9 #include "content/public/browser/notification_service.h" |
10 #include "content/public/test/test_utils.h" | 10 #include "content/public/test/test_utils.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 // from the initial |bounds_|. | 39 // from the initial |bounds_|. |
40 void WaitForEntirelyChanged() { | 40 void WaitForEntirelyChanged() { |
41 if (satisfied_) | 41 if (satisfied_) |
42 return; | 42 return; |
43 | 43 |
44 waiting_ = true; | 44 waiting_ = true; |
45 content::RunMessageLoop(); | 45 content::RunMessageLoop(); |
46 } | 46 } |
47 | 47 |
48 // Implements the content::NotificationObserver interface. | 48 // Implements the content::NotificationObserver interface. |
49 virtual void OnGeometryCacheChanged(const std::string& extension_id, | 49 void OnGeometryCacheChanged(const std::string& extension_id, |
50 const std::string& window_id, | 50 const std::string& window_id, |
51 const gfx::Rect& bounds) | 51 const gfx::Rect& bounds) override { |
52 override { | |
53 if (extension_id != extension_id_ || window_id != window_id_) | 52 if (extension_id != extension_id_ || window_id != window_id_) |
54 return; | 53 return; |
55 | 54 |
56 if (bounds_.x() != bounds.x() && | 55 if (bounds_.x() != bounds.x() && |
57 bounds_.y() != bounds.y() && | 56 bounds_.y() != bounds.y() && |
58 bounds_.width() != bounds.width() && | 57 bounds_.width() != bounds.width() && |
59 bounds_.height() != bounds.height()) { | 58 bounds_.height() != bounds.height()) { |
60 satisfied_ = true; | 59 satisfied_ = true; |
61 cache_->RemoveObserver(this); | 60 cache_->RemoveObserver(this); |
62 | 61 |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 IN_PROC_BROWSER_TEST_F(AppWindowAPITest, TestFrameColors) { | 253 IN_PROC_BROWSER_TEST_F(AppWindowAPITest, TestFrameColors) { |
255 ASSERT_TRUE(RunAppWindowAPITest("testFrameColors")) << message_; | 254 ASSERT_TRUE(RunAppWindowAPITest("testFrameColors")) << message_; |
256 } | 255 } |
257 #endif | 256 #endif |
258 | 257 |
259 IN_PROC_BROWSER_TEST_F(AppWindowAPITest, TestVisibleOnAllWorkspaces) { | 258 IN_PROC_BROWSER_TEST_F(AppWindowAPITest, TestVisibleOnAllWorkspaces) { |
260 ASSERT_TRUE( | 259 ASSERT_TRUE( |
261 RunAppWindowAPITestAndWaitForRoundTrip("testVisibleOnAllWorkspaces")) | 260 RunAppWindowAPITestAndWaitForRoundTrip("testVisibleOnAllWorkspaces")) |
262 << message_; | 261 << message_; |
263 } | 262 } |
OLD | NEW |