Follow-on fix for bug 457825. Use sheet principal for agent and user sheets. r=dbaron...
[wine-gecko.git] / embedding / qa / testembed / WebProgDlg.cpp
blobcdcb844567af074cc75555a368dfe0f98372a154
1 // WebProgDlg.cpp : implementation file
2 //
4 #include "stdafx.h"
5 #include "testembed.h"
6 #include "WebProgDlg.h"
7 #include "QaUtils.h"
9 #ifdef _DEBUG
10 #define new DEBUG_NEW
11 #undef THIS_FILE
12 static char THIS_FILE[] = __FILE__;
13 #endif
15 /////////////////////////////////////////////////////////////////////////////
16 // CWebProgDlg dialog
19 CWebProgDlg::CWebProgDlg(CWnd* pParent /*=NULL*/)
20 : CDialog(CWebProgDlg::IDD, pParent)
22 //{{AFX_DATA_INIT(CWebProgDlg)
23 m_wpFlagValue = 0;
24 m_wpFlagIndex = -1;
25 //}}AFX_DATA_INIT
29 void CWebProgDlg::DoDataExchange(CDataExchange* pDX)
31 CDialog::DoDataExchange(pDX);
32 //{{AFX_DATA_MAP(CWebProgDlg)
33 DDX_Control(pDX, IDC_WPCOMBO, m_webProgFlags);
34 DDX_CBIndex(pDX, IDC_WPCOMBO, m_wpFlagIndex);
35 //}}AFX_DATA_MAP
39 BEGIN_MESSAGE_MAP(CWebProgDlg, CDialog)
40 //{{AFX_MSG_MAP(CWebProgDlg)
41 ON_CBN_SELCHANGE(IDC_WPCOMBO, OnSelectWPCombo)
42 //}}AFX_MSG_MAP
43 END_MESSAGE_MAP()
45 /////////////////////////////////////////////////////////////////////////////
46 // CWebProgDlg message handlers
48 BOOL CWebProgDlg::OnInitWPDialog()
50 CDialog::OnInitDialog();
52 m_wpFlagIndex = 0;
53 m_webProgFlags.SetCurSel(m_wpFlagIndex);
55 return TRUE;
57 void CWebProgDlg::OnSelectWPCombo()
59 m_wpFlagIndex = m_webProgFlags.GetCurSel();
61 if (m_wpFlagIndex == 0) {
62 m_wpFlagValue = nsIWebProgress::NOTIFY_STATE_REQUEST;
63 QAOutput("Selected NOTIFY_STATE_REQUEST flag.", 1);
65 else if (m_wpFlagIndex == 1) {
66 m_wpFlagValue = nsIWebProgress::NOTIFY_STATE_DOCUMENT;
67 QAOutput("Selected NOTIFY_STATE_DOCUMENT flag.", 1);
69 else if (m_wpFlagIndex == 2) {
70 m_wpFlagValue = nsIWebProgress::NOTIFY_STATE_NETWORK;
71 QAOutput("Selected NOTIFY_STATE_NETWORK flag.", 1);
73 else if (m_wpFlagIndex == 3) {
74 m_wpFlagValue = nsIWebProgress::NOTIFY_STATE_WINDOW;
75 QAOutput("Selected NOTIFY_STATE_WINDOW flag.", 1);
77 else if (m_wpFlagIndex == 4) {
78 m_wpFlagValue = nsIWebProgress::NOTIFY_STATE_ALL;
79 QAOutput("Selected NOTIFY_STATE_ALL flag.", 1);
81 else if (m_wpFlagIndex == 5) {
82 m_wpFlagValue = nsIWebProgress::NOTIFY_PROGRESS;
83 QAOutput("Selected NOTIFY_PROGRESS flag.", 1);
85 else if (m_wpFlagIndex == 6) {
86 m_wpFlagValue = nsIWebProgress::NOTIFY_STATUS;
87 QAOutput("Selected NOTIFY_STATUS flag.", 1);
89 else if (m_wpFlagIndex == 7) {
90 m_wpFlagValue = nsIWebProgress::NOTIFY_SECURITY;
91 QAOutput("Selected NOTIFY_SECURITY flag.", 1);
93 else if (m_wpFlagIndex == 8) {
94 m_wpFlagValue = nsIWebProgress::NOTIFY_LOCATION;
95 QAOutput("Selected NOTIFY_LOCATION flag.", 1);
97 else if (m_wpFlagIndex == 9) {
98 m_wpFlagValue = nsIWebProgress::NOTIFY_ALL;
99 QAOutput("Selected NOTIFY_ALL flag.", 1);
101 else
102 QAOutput("NO FLAG!!!.", 1);