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

Side by Side Diff: chrome/browser/apps/app_browsertest.cc

Issue 309223002: Add logging to help diagnose reason for ASan LSan flakiness. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "apps/app_window.h" 5 #include "apps/app_window.h"
6 #include "apps/app_window_registry.h" 6 #include "apps/app_window_registry.h"
7 #include "apps/common/api/app_runtime.h" 7 #include "apps/common/api/app_runtime.h"
8 #include "apps/launcher.h" 8 #include "apps/launcher.h"
9 #include "apps/ui/native_app_window.h" 9 #include "apps/ui/native_app_window.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 #define MAYBE_AppWindowRestoreState DISABLED_AppWindowRestoreState 741 #define MAYBE_AppWindowRestoreState DISABLED_AppWindowRestoreState
742 #else 742 #else
743 #define MAYBE_AppWindowRestoreState AppWindowRestoreState 743 #define MAYBE_AppWindowRestoreState AppWindowRestoreState
744 #endif 744 #endif
745 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_AppWindowRestoreState) { 745 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_AppWindowRestoreState) {
746 ASSERT_TRUE(RunPlatformAppTest("platform_apps/restore_state")); 746 ASSERT_TRUE(RunPlatformAppTest("platform_apps/restore_state"));
747 } 747 }
748 748
749 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, 749 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest,
750 AppWindowAdjustBoundsToBeVisibleOnScreen) { 750 AppWindowAdjustBoundsToBeVisibleOnScreen) {
751 // TODO(benwells): Remove this logging once flakiness has been observed.
752 // See http://crbug.com/377754.
753 LOG(WARNING) << "Loading minimal app";
751 const Extension* extension = LoadAndLaunchPlatformApp("minimal"); 754 const Extension* extension = LoadAndLaunchPlatformApp("minimal");
755 LOG(WARNING) << "Creating window";
752 AppWindow* window = CreateAppWindow(extension); 756 AppWindow* window = CreateAppWindow(extension);
753 757
758 LOG(WARNING) << "Performing tests";
754 // The screen bounds didn't change, the cached bounds didn't need to adjust. 759 // The screen bounds didn't change, the cached bounds didn't need to adjust.
755 gfx::Rect cached_bounds(80, 100, 400, 400); 760 gfx::Rect cached_bounds(80, 100, 400, 400);
756 gfx::Rect cached_screen_bounds(0, 0, 1600, 900); 761 gfx::Rect cached_screen_bounds(0, 0, 1600, 900);
757 gfx::Rect current_screen_bounds(0, 0, 1600, 900); 762 gfx::Rect current_screen_bounds(0, 0, 1600, 900);
758 gfx::Size minimum_size(200, 200); 763 gfx::Size minimum_size(200, 200);
759 gfx::Rect bounds; 764 gfx::Rect bounds;
760 CallAdjustBoundsToBeVisibleOnScreenForAppWindow(window, 765 CallAdjustBoundsToBeVisibleOnScreenForAppWindow(window,
761 cached_bounds, 766 cached_bounds,
762 cached_screen_bounds, 767 cached_screen_bounds,
763 current_screen_bounds, 768 current_screen_bounds,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 816
812 // Don't resize the bounds smaller than minimum size, when the minimum size is 817 // Don't resize the bounds smaller than minimum size, when the minimum size is
813 // larger than the screen. 818 // larger than the screen.
814 CallAdjustBoundsToBeVisibleOnScreenForAppWindow(window, 819 CallAdjustBoundsToBeVisibleOnScreenForAppWindow(window,
815 big_cache_bounds, 820 big_cache_bounds,
816 gfx::Rect(0, 0, 1600, 1000), 821 gfx::Rect(0, 0, 1600, 1000),
817 gfx::Rect(0, 0, 800, 600), 822 gfx::Rect(0, 0, 800, 600),
818 gfx::Size(900, 900), 823 gfx::Size(900, 900),
819 &bounds); 824 &bounds);
820 EXPECT_EQ(bounds, gfx::Rect(0, 0, 900, 900)); 825 EXPECT_EQ(bounds, gfx::Rect(0, 0, 900, 900));
826 LOG(WARNING) << "Tests complete";
821 } 827 }
822 828
823 namespace { 829 namespace {
824 830
825 class PlatformAppDevToolsBrowserTest : public PlatformAppBrowserTest { 831 class PlatformAppDevToolsBrowserTest : public PlatformAppBrowserTest {
826 protected: 832 protected:
827 enum TestFlags { 833 enum TestFlags {
828 RELAUNCH = 0x1, 834 RELAUNCH = 0x1,
829 HAS_ID = 0x2, 835 HAS_ID = 0x2,
830 }; 836 };
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
1317 1323
1318 ExtensionApiTest::ResultCatcher result_catcher; 1324 ExtensionApiTest::ResultCatcher result_catcher;
1319 1325
1320 ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); 1326 ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
1321 1327
1322 EXPECT_TRUE(result_catcher.GetNextResult()); 1328 EXPECT_TRUE(result_catcher.GetNextResult());
1323 } 1329 }
1324 } 1330 }
1325 1331
1326 } // namespace extensions 1332 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698