Index: chrome/browser/ui/cocoa/certificate_viewer_mac_browsertest.mm |
diff --git a/chrome/browser/ui/cocoa/certificate_viewer_mac_browsertest.mm b/chrome/browser/ui/cocoa/certificate_viewer_mac_browsertest.mm |
index ca0fc71d510e147f69a1c48997409d9fba78f83b..95abb67638a8f0fc3583f89f91fa8be553bfe7c1 100644 |
--- a/chrome/browser/ui/cocoa/certificate_viewer_mac_browsertest.mm |
+++ b/chrome/browser/ui/cocoa/certificate_viewer_mac_browsertest.mm |
@@ -6,7 +6,7 @@ |
#include "chrome/browser/ui/browser.h" |
#include "chrome/browser/ui/browser_commands.h" |
-#include "chrome/browser/ui/cocoa/certificate_viewer_mac.h" |
+#include "chrome/browser/ui/cocoa/certificate_viewer_mac_cocoa.h" |
#include "chrome/browser/ui/tabs/tab_strip_model.h" |
#include "chrome/test/base/in_process_browser_test.h" |
#include "components/web_modal/web_contents_modal_dialog_manager.h" |
@@ -58,12 +58,18 @@ IN_PROC_BROWSER_TEST_F(SSLCertificateViewerCocoaTest, HideShow) { |
content::WebContents* web_contents = |
browser()->tab_strip_model()->GetActiveWebContents(); |
+ // TODO(patricialor): Display the certificate viewer in a cross-toolkit manner |
+ // and retrieve |sheetWindow| via the WebContentsModalDialogManager::TestApi. |
+ // See https://crbug.com/613880. |
SSLCertificateViewerCocoa* viewer = |
[[SSLCertificateViewerCocoa alloc] initWithCertificate:cert.get()]; |
[viewer displayForWebContents:web_contents]; |
content::RunAllPendingInMessageLoop(); |
+ // TODO(patricialor): Remove the overlayWindow accessor from |
+ // SSLCertificateViewerMac when the overlay is obtained via |
+ // WebContentsModalDialogManager::TestApi instead - https://crbug.com/613880. |
NSWindow* sheetWindow = [[viewer overlayWindow] attachedSheet]; |
NSRect sheetFrame = [sheetWindow frame]; |
EXPECT_EQ(1.0, [sheetWindow alphaValue]); |
@@ -75,6 +81,7 @@ IN_PROC_BROWSER_TEST_F(SSLCertificateViewerCocoaTest, HideShow) { |
// Switch back and verify that the sheet is shown. |
chrome::SelectNumberedTab(browser(), 0); |
+ content::RunAllPendingInMessageLoop(); |
EXPECT_EQ(1.0, [sheetWindow alphaValue]); |
EXPECT_NSEQ(sheetFrame, [sheetWindow frame]); |
} |