コード例 #1
0
ファイル: window.py プロジェクト: u2ubf989u2/mitmproxy
 def __init__(self, master, base):
     self.master = master
     self.windows = dict(
         flowlist=flowlist.FlowListBox(master),
         flowview=flowview.FlowView(master),
         commands=commands.Commands(master),
         keybindings=keybindings.KeyBindings(master),
         options=options.Options(master),
         help=help.HelpView(master),
         eventlog=eventlog.EventLog(master),
         edit_focus_query=grideditor.QueryEditor(master),
         edit_focus_cookies=grideditor.CookieEditor(master),
         edit_focus_setcookies=grideditor.SetCookieEditor(master),
         edit_focus_setcookie_attrs=grideditor.CookieAttributeEditor(
             master),
         edit_focus_multipart_form=grideditor.RequestMultipartEditor(
             master),
         edit_focus_urlencoded_form=grideditor.RequestUrlEncodedEditor(
             master),
         edit_focus_path=grideditor.PathEditor(master),
         edit_focus_request_headers=grideditor.RequestHeaderEditor(master),
         edit_focus_response_headers=grideditor.ResponseHeaderEditor(
             master),
     )
     self.stack = [base]
     self.overlay = None
コード例 #2
0
 def view_help(self):
     hc = self.view_stack[-1].helpctx
     signals.push_view_state.send(
         self,
         window=window.Window(self, help.HelpView(hc), None,
                              statusbar.StatusBar(self, help.footer), None,
                              "help"))
コード例 #3
0
 def view_help(self, helpctx):
     signals.push_view_state.send(
         self,
         window = window.Window(
             self,
             help.HelpView(helpctx),
             None,
             statusbar.StatusBar(self, help.footer),
             None
         )
     )
コード例 #4
0
    def __init__(self, master, base):
        self.master = master
        self.windows = dict(
            flowlist = flowlist.FlowListBox(master),
            flowview = flowview.FlowView(master),
            commands = commands.Commands(master),
            options = options.Options(master),
            help = help.HelpView(master),
            eventlog = eventlog.EventLog(master),

            edit_focus_query = grideditor.QueryEditor(master),
            edit_focus_cookies = grideditor.CookieEditor(master),
            edit_focus_setcookies = grideditor.SetCookieEditor(master),
            edit_focus_form = grideditor.RequestFormEditor(master),
            edit_focus_path = grideditor.PathEditor(master),
            edit_focus_request_headers = grideditor.RequestHeaderEditor(master),
            edit_focus_response_headers = grideditor.ResponseHeaderEditor(master),
        )
        self.stack = [base]
        self.overlay = None
コード例 #5
0
 def test_helptext(self):
     h = help.HelpView(None)
     assert h.helptext()
コード例 #6
0
ファイル: test_help.py プロジェクト: kaikun213/my-wob-env
 def test_keypress(self):
     h = help.HelpView([1, 2, 3])
     assert not h.keypress((0, 0), "q")
     assert not h.keypress((0, 0), "?")
     assert h.keypress((0, 0), "o") == "o"