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

Side by Side Diff: chrome/browser/ui/cocoa/certificate_viewer_mac_browsertest.mm

Issue 2034993002: Fix Hiding Issue with Certificate Viewer Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert the old CL's change on the browser test Created 4 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
« no previous file with comments | « chrome/browser/ui/cocoa/certificate_viewer_mac.mm ('k') | 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #import "chrome/browser/certificate_viewer.h" 5 #import "chrome/browser/certificate_viewer.h"
6 6
7 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/browser_commands.h" 8 #include "chrome/browser/ui/browser_commands.h"
9 #include "chrome/browser/ui/cocoa/certificate_viewer_mac.h" 9 #include "chrome/browser/ui/cocoa/certificate_viewer_mac.h"
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" 10 #include "chrome/browser/ui/tabs/tab_strip_model.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 content::RunAllPendingInMessageLoop(); 65 content::RunAllPendingInMessageLoop();
66 66
67 NSWindow* sheetWindow = [[viewer overlayWindow] attachedSheet]; 67 NSWindow* sheetWindow = [[viewer overlayWindow] attachedSheet];
68 NSRect sheetFrame = [sheetWindow frame]; 68 NSRect sheetFrame = [sheetWindow frame];
69 EXPECT_EQ(1.0, [sheetWindow alphaValue]); 69 EXPECT_EQ(1.0, [sheetWindow alphaValue]);
70 70
71 // Switch to another tab and verify that the sheet is hidden. 71 // Switch to another tab and verify that the sheet is hidden.
72 AddBlankTabAndShow(browser()); 72 AddBlankTabAndShow(browser());
73 EXPECT_EQ(0.0, [sheetWindow alphaValue]); 73 EXPECT_EQ(0.0, [sheetWindow alphaValue]);
74 EXPECT_NSEQ(sheetFrame, [sheetWindow frame]); 74 EXPECT_NSEQ(ui::kWindowSizeDeterminedLater, [sheetWindow frame]);
75 75
76 // Switch back and verify that the sheet is shown. 76 // Switch back and verify that the sheet is shown.
77 chrome::SelectNumberedTab(browser(), 0); 77 chrome::SelectNumberedTab(browser(), 0);
78 EXPECT_EQ(1.0, [sheetWindow alphaValue]); 78 EXPECT_EQ(1.0, [sheetWindow alphaValue]);
79 EXPECT_NSEQ(sheetFrame, [sheetWindow frame]); 79 EXPECT_NSEQ(sheetFrame, [sheetWindow frame]);
80 } 80 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/certificate_viewer_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698