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

Side by Side Diff: chrome/test/data/webui/certificate_viewer_ui_test-inl.h

Issue 10702029: Move tab functions off Browser into browser_tabstrip and browser_tabrestore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | « chrome/test/base/ui_test_utils.cc ('k') | chrome/test/gpu/gpu_pixel_browsertest.cc » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/certificate_viewer.h" 5 #include "chrome/browser/certificate_viewer.h"
6 #include "chrome/browser/ui/browser.h" 6 #include "chrome/browser/ui/browser.h"
7 #include "chrome/browser/ui/browser_tabstrip.h"
7 #include "chrome/browser/ui/browser_window.h" 8 #include "chrome/browser/ui/browser_window.h"
8 #include "chrome/browser/ui/webui/certificate_viewer_webui.h" 9 #include "chrome/browser/ui/webui/certificate_viewer_webui.h"
9 #include "chrome/browser/ui/webui/web_ui_browsertest.h" 10 #include "chrome/browser/ui/webui/web_ui_browsertest.h"
10 #include "chrome/common/url_constants.h" 11 #include "chrome/common/url_constants.h"
11 #include "chrome/test/base/test_web_dialog_observer.h" 12 #include "chrome/test/base/test_web_dialog_observer.h"
12 #include "chrome/test/base/ui_test_utils.h" 13 #include "chrome/test/base/ui_test_utils.h"
13 #include "content/public/browser/render_view_host.h" 14 #include "content/public/browser/render_view_host.h"
14 #include "content/public/browser/web_contents.h" 15 #include "content/public/browser/web_contents.h"
15 #include "content/public/browser/web_ui.h" 16 #include "content/public/browser/web_ui.h"
16 #include "net/base/test_certificate_data.h" 17 #include "net/base/test_certificate_data.h"
(...skipping 14 matching lines...) Expand all
31 net::X509Certificate::CreateFromBytes( 32 net::X509Certificate::CreateFromBytes(
32 reinterpret_cast<const char*>(google_der), sizeof(google_der))); 33 reinterpret_cast<const char*>(google_der), sizeof(google_der)));
33 34
34 ASSERT_TRUE(browser()); 35 ASSERT_TRUE(browser());
35 ASSERT_TRUE(browser()->window()); 36 ASSERT_TRUE(browser()->window());
36 37
37 TestWebDialogObserver dialog_observer(this); 38 TestWebDialogObserver dialog_observer(this);
38 CertificateViewerDialog* dialog = new CertificateViewerDialog( 39 CertificateViewerDialog* dialog = new CertificateViewerDialog(
39 google_cert); 40 google_cert);
40 dialog->AddObserver(&dialog_observer); 41 dialog->AddObserver(&dialog_observer);
41 dialog->Show(browser()->GetActiveWebContents(), 42 dialog->Show(chrome::GetActiveWebContents(browser()),
42 browser()->window()->GetNativeWindow()); 43 browser()->window()->GetNativeWindow());
43 dialog->RemoveObserver(&dialog_observer); 44 dialog->RemoveObserver(&dialog_observer);
44 content::WebUI* webui = dialog_observer.GetWebUI(); 45 content::WebUI* webui = dialog_observer.GetWebUI();
45 webui->GetWebContents()->GetRenderViewHost()->SetWebUIProperty( 46 webui->GetWebContents()->GetRenderViewHost()->SetWebUIProperty(
46 "expectedUrl", chrome::kChromeUICertificateViewerURL); 47 "expectedUrl", chrome::kChromeUICertificateViewerURL);
47 SetWebUIInstance(webui); 48 SetWebUIInstance(webui);
48 } 49 }
OLDNEW
« no previous file with comments | « chrome/test/base/ui_test_utils.cc ('k') | chrome/test/gpu/gpu_pixel_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698