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

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

Issue 14969012: components: Create web_modal component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-before-land Created 7 years, 7 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
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"
11 #include "chrome/browser/ui/web_contents_modal_dialog_manager.h"
12 #include "chrome/test/base/in_process_browser_test.h" 11 #include "chrome/test/base/in_process_browser_test.h"
12 #include "components/web_modal/web_contents_modal_dialog_manager.h"
13 #include "content/public/browser/web_contents.h" 13 #include "content/public/browser/web_contents.h"
14 #include "content/public/browser/web_contents_view.h" 14 #include "content/public/browser/web_contents_view.h"
15 #include "content/public/test/test_utils.h" 15 #include "content/public/test/test_utils.h"
16 #include "net/base/test_data_directory.h" 16 #include "net/base/test_data_directory.h"
17 #include "net/cert/x509_certificate.h" 17 #include "net/cert/x509_certificate.h"
18 #include "net/test/cert_test_util.h" 18 #include "net/test/cert_test_util.h"
19 #include "ui/base/cocoa/window_size_constants.h" 19 #include "ui/base/cocoa/window_size_constants.h"
20 20
21 using web_modal::WebContentsModalDialogManager;
22
21 typedef InProcessBrowserTest SSLCertificateViewerCocoaTest; 23 typedef InProcessBrowserTest SSLCertificateViewerCocoaTest;
22 24
23 namespace { 25 namespace {
24 scoped_refptr<net::X509Certificate> GetSampleCertificate() { 26 scoped_refptr<net::X509Certificate> GetSampleCertificate() {
25 return net::ImportCertFromFile(net::GetTestCertsDirectory(), 27 return net::ImportCertFromFile(net::GetTestCertsDirectory(),
26 "mit.davidben.der"); 28 "mit.davidben.der");
27 } 29 }
28 } // namespace 30 } // namespace
29 31
30 IN_PROC_BROWSER_TEST_F(SSLCertificateViewerCocoaTest, Basic) { 32 IN_PROC_BROWSER_TEST_F(SSLCertificateViewerCocoaTest, Basic) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 AddBlankTabAndShow(browser()); 72 AddBlankTabAndShow(browser());
71 EXPECT_EQ(0.0, [sheetWindow alphaValue]); 73 EXPECT_EQ(0.0, [sheetWindow alphaValue]);
72 EXPECT_TRUE( 74 EXPECT_TRUE(
73 NSEqualRects(ui::kWindowSizeDeterminedLater, [sheetWindow frame])); 75 NSEqualRects(ui::kWindowSizeDeterminedLater, [sheetWindow frame]));
74 76
75 // Switch back and verify that the sheet is shown. 77 // Switch back and verify that the sheet is shown.
76 chrome::SelectNumberedTab(browser(), 0); 78 chrome::SelectNumberedTab(browser(), 0);
77 EXPECT_EQ(1.0, [sheetWindow alphaValue]); 79 EXPECT_EQ(1.0, [sheetWindow alphaValue]);
78 EXPECT_TRUE(NSEqualRects(sheetFrame, [sheetWindow frame])); 80 EXPECT_TRUE(NSEqualRects(sheetFrame, [sheetWindow frame]));
79 } 81 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.mm ('k') | chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698