Best Python code snippet using gherkin-python
AutoLoads.py
Source:AutoLoads.py
...29 except Exception as e:30 print(f"Error: {loadmodule_command} {module_name}: {e}")31def run_autoloads(command, randomuri, user):32 command = command.lower().strip()33 if command.startswith("invoke-eternalblue"): check_module_loaded("Exploit-EternalBlue.ps1", randomuri, user)34 elif command.startswith("invoke-psuacme"): check_module_loaded("Invoke-PsUACme.ps1", randomuri, user)35 elif command.startswith("invoke-bloodhound"): check_module_loaded("SharpHound.ps1", randomuri, user)36 elif command.startswith("brute-ad"): check_module_loaded("Brute-AD.ps1", randomuri, user)37 elif command.startswith("brute-locadmin"): check_module_loaded("Brute-LocAdmin.ps1", randomuri, user)38 elif command.startswith("bypass-uac"): check_module_loaded("Bypass-UAC.ps1", randomuri, user)39 elif command.startswith("cred-popper"): check_module_loaded("Cred-Popper.ps1", randomuri, user)40 elif command.startswith("cve-2016-9192"): check_module_loaded("CVE-2016-9192.ps1", randomuri, user)41 elif command.startswith("convertto-shellcode"): check_module_loaded("ConvertTo-Shellcode.ps1", randomuri, user)42 elif command.startswith("decrypt-rdcman"): check_module_loaded("Decrypt-RDCMan.ps1", randomuri, user)43 elif command.startswith("dump-ntds"): check_module_loaded("Dump-NTDS.ps1", randomuri, user)44 elif command.startswith("get-computerinfo"): check_module_loaded("Get-ComputerInfo.ps1", randomuri, user)45 elif command.startswith("get-creditcarddata"): check_module_loaded("Get-CreditCardData.ps1", randomuri, user)46 elif command.startswith("get-gppautologon"): check_module_loaded("Get-GPPAutologon.ps1", randomuri, user)47 elif command.startswith("get-gpppassword"): check_module_loaded("Get-GPPPassword.ps1", randomuri, user)48 elif command.startswith("get-idletime"): check_module_loaded("Get-IdleTime.ps1", randomuri, user)49 elif command.startswith("get-ipconfig"): check_module_loaded("Get-IPConfig.ps1", randomuri, user)50 elif command.startswith("get-keystrokes"): check_module_loaded("Get-Keystrokes.ps1", randomuri, user)51 elif command.startswith("get-hash"): check_module_loaded("Get-Hash.ps1", randomuri, user)52 elif command.startswith("get-locadm"): check_module_loaded("Get-LocAdm.ps1", randomuri, user)53 elif command.startswith("get-mshotfixes"): check_module_loaded("Get-MSHotFixes.ps1", randomuri, user)54 elif command.startswith("get-netstat"): check_module_loaded("Get-Netstat.ps1", randomuri, user)55 elif command.startswith("get-passnotexp"): check_module_loaded("Get-PassNotExp.ps1", randomuri, user)56 elif command.startswith("get-passpol"): check_module_loaded("Get-PassPol.ps1", randomuri, user)57 elif command.startswith("get-recentfiles"): check_module_loaded("Get-RecentFiles.ps1", randomuri, user)58 elif command.startswith("get-serviceperms"): check_module_loaded("Get-ServicePerms.ps1", randomuri, user)59 elif command.startswith("get-userinfo"): check_module_loaded("Get-UserInfo.ps1", randomuri, user)60 elif command.startswith("get-wlanpass"): check_module_loaded("Get-WLANPass.ps1", randomuri, user)61 elif command.startswith("invoke-pbind"): check_module_loaded("Invoke-Pbind.ps1", randomuri, user)62 elif command.startswith("get-domaingroupmember"): check_module_loaded("powerview.ps1", randomuri, user)63 elif command.startswith("invoke-kerberoast"): check_module_loaded("powerview.ps1", randomuri, user)64 elif command.startswith("resolve-ipaddress"): check_module_loaded("powerview.ps1", randomuri, user)65 elif command.startswith("invoke-userhunter"): check_module_loaded("powerview.ps1", randomuri, user)66 elif command.startswith("get-netlocalgroupmember"): check_module_loaded("powerview.ps1", randomuri, user)67 elif command.startswith("invoke-daisychain"): check_module_loaded("invoke-daisychain.ps1", randomuri, user)68 elif command.startswith("invoke-hostenum"): check_module_loaded("HostEnum.ps1", randomuri, user)69 elif command.startswith("inject-shellcode"): check_module_loaded("Inject-Shellcode.ps1", randomuri, user)70 elif command.startswith("inveigh-relay"): check_module_loaded("Inveigh-Relay.ps1", randomuri, user)71 elif command.startswith("inveigh"): check_module_loaded("Inveigh.ps1", randomuri, user)72 elif command.startswith("invoke-inveigh"): check_module_loaded("Inveigh.ps1", randomuri, user)73 elif command.startswith("invoke-arpscan"): check_module_loaded("Invoke-Arpscan.ps1", randomuri, user)74 elif command.startswith("arpscan"): check_module_loaded("Invoke-Arpscan.ps1", randomuri, user)75 elif command.startswith("invoke-dcsync"): check_module_loaded("Invoke-DCSync.ps1", randomuri, user)76 elif command.startswith("invoke-eventvwrbypass"): check_module_loaded("Invoke-EventVwrBypass.ps1", randomuri, user)77 elif command.startswith("invoke-hostscan"): check_module_loaded("Invoke-Hostscan.ps1", randomuri, user)78 elif command.startswith("invoke-ms16-032-proxy"): check_module_loaded("Invoke-MS16-032-Proxy.ps1", randomuri, user)79 elif command.startswith("invoke-ms16-032"): check_module_loaded("Invoke-MS16-032.ps1", randomuri, user)80 elif command.startswith("invoke-mimikatz"): check_module_loaded("Invoke-Mimikatz.ps1", randomuri, user)81 elif command.startswith("invoke-psinject"): check_module_loaded("Invoke-PSInject.ps1", randomuri, user)82 elif command.startswith("invoke-pipekat"): check_module_loaded("Invoke-Pipekat.ps1", randomuri, user)83 elif command.startswith("invoke-portscan"): check_module_loaded("Invoke-Portscan.ps1", randomuri, user)84 elif command.startswith("invoke-powerdump"): check_module_loaded("Invoke-PowerDump.ps1", randomuri, user)85 elif command.startswith("invoke-psexec"): check_module_loaded("Invoke-SMBExec.ps1", randomuri, user)86 elif command.startswith("invoke-reflectivepeinjection"): check_module_loaded("Invoke-ReflectivePEInjection.ps1", randomuri, user)87 elif command.startswith("invoke-reversednslookup"): check_module_loaded("Invoke-ReverseDnsLookup.ps1", randomuri, user)88 elif command.startswith("invoke-runas"): check_module_loaded("Invoke-RunAs.ps1", randomuri, user)89 elif command.startswith("runas-netonly"): check_module_loaded("RunAs-NetOnly.ps1", randomuri, user)90 elif command.startswith("invoke-smblogin"): check_module_loaded("Invoke-SMBExec.ps1", randomuri, user)91 elif command.startswith("invoke-smbclient"): check_module_loaded("Invoke-SMBClient.ps1", randomuri, user)92 elif command.startswith("invoke-smbexec"): check_module_loaded("Invoke-SMBExec.ps1", randomuri, user)93 elif command.startswith("invoke-psexec"): check_module_loaded("Invoke-SMBExec.ps1", randomuri, user)94 elif command.startswith("invoke-shellcode"): check_module_loaded("Invoke-Shellcode.ps1", randomuri, user)95 elif command.startswith("invoke-sniffer"): check_module_loaded("Invoke-Sniffer.ps1", randomuri, user)96 elif command.startswith("invoke-sqlquery"): check_module_loaded("Invoke-SqlQuery.ps1", randomuri, user)97 elif command.startswith("invoke-tater"): check_module_loaded("Invoke-Tater.ps1", randomuri, user)98 elif command.startswith("invoke-thehash"): check_module_loaded("Invoke-TheHash.ps1", randomuri, user)99 elif command.startswith("invoke-tokenmanipulation"): check_module_loaded("Invoke-TokenManipulation.ps1", randomuri, user)100 elif command.startswith("invoke-wmichecker"): check_module_loaded("Invoke-WMIChecker.ps1", randomuri, user)101 elif command.startswith("invoke-wmicommand"): check_module_loaded("Invoke-WMICommand.ps1", randomuri, user)102 elif command.startswith("invoke-wscriptbypassuac"): check_module_loaded("Invoke-WScriptBypassUAC.ps1", randomuri, user)103 elif command.startswith("invoke-winrmsession"): check_module_loaded("Invoke-WinRMSession.ps1", randomuri, user)104 elif command.startswith("out-minidump"): check_module_loaded("Out-Minidump.ps1", randomuri, user)105 elif command.startswith("portscan"): check_module_loaded("PortScanner.ps1", randomuri, user)106 elif command.startswith("powercat"): check_module_loaded("powercat.ps1", randomuri, user)107 elif command.startswith("invoke-allchecks"): check_module_loaded("PowerUp.ps1", randomuri, user)108 elif command.startswith("set-lhstokenprivilege"): check_module_loaded("Set-LHSTokenPrivilege.ps1", randomuri, user)109 elif command.startswith("sharpsocks"): check_module_loaded("SharpSocks.ps1", randomuri, user)110 elif command.startswith("find-allvulns"): check_module_loaded("Sherlock.ps1", randomuri, user)111 elif command.startswith("test-adcredential"): check_module_loaded("Test-ADCredential.ps1", randomuri, user)112 elif command.startswith("new-zipfile"): check_module_loaded("Zippy.ps1", randomuri, user)113 elif command.startswith("get-netuser"): check_module_loaded("powerview.ps1", randomuri, user)114 elif command.startswith("invoke-aclscanner"): check_module_loaded("powerview.ps1", randomuri, user)115 elif command.startswith("get-dfsshare"): check_module_loaded("powerview.ps1", randomuri, user)116 elif command.startswith("get-objectacl"): check_module_loaded("powerview.ps1", randomuri, user)117 elif command.startswith("add-objectacl"): check_module_loaded("powerview.ps1", randomuri, user)118 elif command.startswith("get-netuser"): check_module_loaded("powerview.ps1", randomuri, user)119 elif command.startswith("get-domainuser"): check_module_loaded("powerview.ps1", randomuri, user)120 elif command.startswith("get-netcomputer"): check_module_loaded("powerview.ps1", randomuri, user)121 elif command.startswith("get-domaincomputer"): check_module_loaded("powerview.ps1", randomuri, user)122 elif command.startswith("get-netuser"): check_module_loaded("powerview.ps1", randomuri, user)123 elif command.startswith("get-netgroup"): check_module_loaded("powerview.ps1", randomuri, user)124 elif command.startswith("get-netgroupmember"): check_module_loaded("powerview.ps1", randomuri, user)125 elif command.startswith("get-netshare"): check_module_loaded("powerview.ps1", randomuri, user)126 elif command.startswith("invoke-sharefinder"): check_module_loaded("powerview.ps1", randomuri, user)127 elif command.startswith("get-netdomain"): check_module_loaded("powerview.ps1", randomuri, user)128 elif command.startswith("get-netdomaincontroller"): check_module_loaded("powerview.ps1", randomuri, user)129 elif command.startswith("get-netforest"): check_module_loaded("powerview.ps1", randomuri, user)130 elif command.startswith("find-domainshare"): check_module_loaded("powerview.ps1", randomuri, user)131 elif command.startswith("get-netforestdomain"): check_module_loaded("powerview.ps1", randomuri, user)132 elif command.startswith("invoke-mapdomaintrust"): check_module_loaded("powerview.ps1", randomuri, user)133 elif command.startswith("get-wmireglastloggedon"): check_module_loaded("powerview.ps1", randomuri, user)134 elif command.startswith("get-wmiregcachedrdpconnection"): check_module_loaded("powerview.ps1", randomuri, user)135 elif command.startswith("get-wmiregmounteddrive"): check_module_loaded("powerview.ps1", randomuri, user)136 elif command.startswith("invoke-wmievent"): check_module_loaded("Invoke-WMIEvent.ps1", randomuri, user)137 elif command.startswith("remove-wmievent"): check_module_loaded("Invoke-WMIEvent.ps1", randomuri, user)138 elif command.startswith("invoke-wmi"): check_module_loaded("Invoke-WMIExec.ps1", randomuri, user)139 elif command.startswith("get-lapspasswords"): check_module_loaded("Get-LAPSPasswords.ps1", randomuri, user)140 elif command.startswith("new-jscriptshell"): check_module_loaded("New-JScriptShell.ps1", randomuri, user)141 elif command.startswith("invoke-edrchecker"): check_module_loaded("Invoke-EDRChecker.ps1", randomuri, user)142def run_autoloads_sharp(command, randomuri, user):143 command = command.lower().strip()144 if command.startswith("run-exe seatbelt"): check_module_loaded("Seatbelt.exe", randomuri, user)145 elif command.startswith("run-exe smbexec.program"): check_module_loaded("SExec.exe", randomuri, user)146 elif command.startswith("run-exe sharpup"): check_module_loaded("SharpUp.exe", randomuri, user)147 elif command.startswith("run-exe safetydump"): check_module_loaded("SafetyDump.exe", randomuri, user)148 elif command.startswith("run-exe rubeus"): check_module_loaded("Rubeus.exe", randomuri, user)149 elif command.startswith("run-exe sharpview"): check_module_loaded("SharpView.exe", randomuri, user)150 elif command.startswith("run-exe watson"): check_module_loaded("Watson.exe", randomuri, user)151 elif command.startswith("run-exe sharphound"): check_module_loaded("SharpHound.exe", randomuri, user)152 elif command.startswith("run-exe internalmonologue"): check_module_loaded("InternalMonologue.exe", randomuri, user)153 elif command.startswith("run-exe sharpsocks"): check_module_loaded("SharpSocks.exe", randomuri, user)154 elif command.startswith("run-exe sharpweb"): check_module_loaded("SharpWeb.exe", randomuri, user)155 elif command.startswith("run-exe sharpwmi"): check_module_loaded("SharpWMI.exe", randomuri, user)156 elif command.startswith("run-exe wmiexec.program"): check_module_loaded("WExec.exe", randomuri, user)157 elif command.startswith("run-exe smbexec.program"): check_module_loaded("SExec.exe", randomuri, user)158 elif command.startswith("run-exe invoke_dcom.program"): check_module_loaded("DCOM.exe", randomuri, user)159 elif command.startswith("run-exe sharpsc.program"): check_module_loaded("SharpSC.exe", randomuri, user)160 elif command.startswith("get-screenshotallwindows"): check_module_loaded("Screenshot.dll", randomuri, user)161 elif command.startswith("run-exe sharpcookiemonster.program"): check_module_loaded("SharpCookieMonster.exe", randomuri, user)162 elif command.startswith("sharpsocks"): check_module_loaded("SharpSocks.exe", randomuri, user)163 elif command.startswith("safetykatz"): check_module_loaded("SafetyKatz.exe", randomuri, user)164 elif command.startswith("sharpwmi"): check_module_loaded("SharpWMI.exe", randomuri, user)165 elif command.startswith("sharpsc"): check_module_loaded("SharpSC.exe", randomuri, user)166 elif command.startswith("sharpcookiemonster"): check_module_loaded("SharpCookieMonster.exe", randomuri, user)167 elif command.startswith("run-exe program ps"): check_module_loaded("PS.exe", randomuri, user)168 elif command.startswith("pslo"): check_module_loaded("PS.exe", randomuri, user)169 elif command.startswith("run-dll sharpsploit"): check_module_loaded("SharpSploit.dll", randomuri, user)170 elif command.startswith("run-exe mainclass runascs"): check_module_loaded("RunasCs.exe", randomuri, user)171 elif command.startswith("invoke-daisychain"): check_module_loaded("Daisy.dll", randomuri, user)172 elif command.startswith("run-exe runas.program runas"): check_module_loaded("RunAs.exe", randomuri, user)173 elif command.startswith("portscan"): check_module_loaded("PortScanner.dll", randomuri, user)174 elif command.startswith("run-exe sweetpotato.program "): check_module_loaded("SweetPotato.exe", randomuri, user)175 elif command.startswith("run-exe sharpdpapi.program "): check_module_loaded("SharpDPAPI.exe", randomuri, user)...
string-startswith.js
Source:string-startswith.js
1// Copyright 2014 the V8 project authors. All rights reserved.2// Redistribution and use in source and binary forms, with or without3// modification, are permitted provided that the following conditions are4// met:5//6// * Redistributions of source code must retain the above copyright7// notice, this list of conditions and the following disclaimer.8// * Redistributions in binary form must reproduce the above9// copyright notice, this list of conditions and the following10// disclaimer in the documentation and/or other materials provided11// with the distribution.12// * Neither the name of Google Inc. nor the names of its13// contributors may be used to endorse or promote products derived14// from this software without specific prior written permission.15//16// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS17// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT18// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR19// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT20// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,21// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT22// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,23// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY24// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT25// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE26// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.27assertFalse("abc".startsWith("a", Infinity));28assertEquals(1, String.prototype.startsWith.length);29var testString = "Hello World";30assertTrue(testString.startsWith(""));31assertTrue(testString.startsWith("Hello"));32assertFalse(testString.startsWith("hello"));33assertFalse(testString.startsWith("Hello World!"));34assertFalse(testString.startsWith(null));35assertFalse(testString.startsWith(undefined));36assertFalse(testString.startsWith());37assertTrue("null".startsWith(null));38assertTrue("undefined".startsWith(undefined));39var georgianUnicodeString = "\u10D0\u10D1\u10D2\u10D3\u10D4\u10D5\u10D6\u10D7";40assertTrue(georgianUnicodeString.startsWith(georgianUnicodeString));41assertTrue(georgianUnicodeString.startsWith("\u10D0\u10D1\u10D2"));42assertFalse(georgianUnicodeString.startsWith("\u10D8"));43assertThrows("String.prototype.startsWith.call(null, 'test')", TypeError);44assertThrows("String.prototype.startsWith.call(null, null)", TypeError);45assertThrows("String.prototype.startsWith.call(undefined, undefined)", TypeError);46assertThrows("String.prototype.startsWith.apply(null, ['test'])", TypeError);47assertThrows("String.prototype.startsWith.apply(null, [null])", TypeError);48assertThrows("String.prototype.startsWith.apply(undefined, [undefined])", TypeError);49var TEST_INPUT = [{50 msg: "Empty string", val: ""51}, {52 msg: "Number 1234.34", val: 1234.3453}, {54 msg: "Integer number 0", val: 055}, {56 msg: "Negative number -1", val: -157}, {58 msg: "Boolean true", val: true59}, {60 msg: "Boolean false", val: false61}, {62 msg: "Empty array []", val: []63}, {64 msg: "Empty object {}", val: {}65}, {66 msg: "Array of size 3", val: new Array(3)67}];68function testNonStringValues() {69 var i = 0;70 var l = TEST_INPUT.length;71 for (; i < l; i++) {72 var e = TEST_INPUT[i];73 var v = e.val;74 var s = String(v);75 assertTrue(s.startsWith(v), e.msg);76 assertTrue(String.prototype.startsWith.call(v, v), e.msg);77 assertTrue(String.prototype.startsWith.apply(v, [v]), e.msg);78 }79}80testNonStringValues();81var CustomType = function(value) {82 this.startsWith = String.prototype.startsWith;83 this.toString = function() {84 return String(value);85 }86};87function testCutomType() {88 var i = 0;89 var l = TEST_INPUT.length;90 for (; i < l; i++) {91 var e = TEST_INPUT[i];92 var v = e.val;93 var o = new CustomType(v);94 assertTrue(o.startsWith(v), e.msg);95 }96}97testCutomType();98// Test cases found in FF99assertTrue("abc".startsWith("abc"));100assertTrue("abcd".startsWith("abc"));101assertTrue("abc".startsWith("a"));102assertFalse("abc".startsWith("abcd"));103assertFalse("abc".startsWith("bcde"));104assertFalse("abc".startsWith("b"));105assertTrue("abc".startsWith("abc", 0));106assertFalse("abc".startsWith("bc", 0));107assertTrue("abc".startsWith("bc", 1));108assertFalse("abc".startsWith("c", 1));109assertFalse("abc".startsWith("abc", 1));110assertTrue("abc".startsWith("c", 2));111assertFalse("abc".startsWith("d", 2));112assertFalse("abc".startsWith("dcd", 2));113assertFalse("abc".startsWith("a", 42));114assertFalse("abc".startsWith("a", Infinity));115assertTrue("abc".startsWith("a", NaN));116assertFalse("abc".startsWith("b", NaN));117assertTrue("abc".startsWith("ab", -43));118assertTrue("abc".startsWith("ab", -Infinity));119assertFalse("abc".startsWith("bc", -42));120assertFalse("abc".startsWith("bc", -Infinity));121// Test cases taken from122// https://github.com/mathiasbynens/String.prototype.startsWith/blob/master/tests/tests.js123Object.prototype[1] = 2; // try to break `arguments[1]`124assertEquals(String.prototype.startsWith.length, 1);125assertEquals(String.prototype.propertyIsEnumerable("startsWith"), false);126assertEquals("undefined".startsWith(), true);127assertEquals("undefined".startsWith(undefined), true);128assertEquals("undefined".startsWith(null), false);129assertEquals("null".startsWith(), false);130assertEquals("null".startsWith(undefined), false);131assertEquals("null".startsWith(null), true);132assertEquals("abc".startsWith(), false);133assertEquals("abc".startsWith(""), true);134assertEquals("abc".startsWith("\0"), false);135assertEquals("abc".startsWith("a"), true);136assertEquals("abc".startsWith("b"), false);137assertEquals("abc".startsWith("ab"), true);138assertEquals("abc".startsWith("bc"), false);139assertEquals("abc".startsWith("abc"), true);140assertEquals("abc".startsWith("bcd"), false);141assertEquals("abc".startsWith("abcd"), false);142assertEquals("abc".startsWith("bcde"), false);143assertEquals("abc".startsWith("", NaN), true);144assertEquals("abc".startsWith("\0", NaN), false);145assertEquals("abc".startsWith("a", NaN), true);146assertEquals("abc".startsWith("b", NaN), false);147assertEquals("abc".startsWith("ab", NaN), true);148assertEquals("abc".startsWith("bc", NaN), false);149assertEquals("abc".startsWith("abc", NaN), true);150assertEquals("abc".startsWith("bcd", NaN), false);151assertEquals("abc".startsWith("abcd", NaN), false);152assertEquals("abc".startsWith("bcde", NaN), false);153assertEquals("abc".startsWith("", false), true);154assertEquals("abc".startsWith("\0", false), false);155assertEquals("abc".startsWith("a", false), true);156assertEquals("abc".startsWith("b", false), false);157assertEquals("abc".startsWith("ab", false), true);158assertEquals("abc".startsWith("bc", false), false);159assertEquals("abc".startsWith("abc", false), true);160assertEquals("abc".startsWith("bcd", false), false);161assertEquals("abc".startsWith("abcd", false), false);162assertEquals("abc".startsWith("bcde", false), false);163assertEquals("abc".startsWith("", undefined), true);164assertEquals("abc".startsWith("\0", undefined), false);165assertEquals("abc".startsWith("a", undefined), true);166assertEquals("abc".startsWith("b", undefined), false);167assertEquals("abc".startsWith("ab", undefined), true);168assertEquals("abc".startsWith("bc", undefined), false);169assertEquals("abc".startsWith("abc", undefined), true);170assertEquals("abc".startsWith("bcd", undefined), false);171assertEquals("abc".startsWith("abcd", undefined), false);172assertEquals("abc".startsWith("bcde", undefined), false);173assertEquals("abc".startsWith("", null), true);174assertEquals("abc".startsWith("\0", null), false);175assertEquals("abc".startsWith("a", null), true);176assertEquals("abc".startsWith("b", null), false);177assertEquals("abc".startsWith("ab", null), true);178assertEquals("abc".startsWith("bc", null), false);179assertEquals("abc".startsWith("abc", null), true);180assertEquals("abc".startsWith("bcd", null), false);181assertEquals("abc".startsWith("abcd", null), false);182assertEquals("abc".startsWith("bcde", null), false);183assertEquals("abc".startsWith("", -Infinity), true);184assertEquals("abc".startsWith("\0", -Infinity), false);185assertEquals("abc".startsWith("a", -Infinity), true);186assertEquals("abc".startsWith("b", -Infinity), false);187assertEquals("abc".startsWith("ab", -Infinity), true);188assertEquals("abc".startsWith("bc", -Infinity), false);189assertEquals("abc".startsWith("abc", -Infinity), true);190assertEquals("abc".startsWith("bcd", -Infinity), false);191assertEquals("abc".startsWith("abcd", -Infinity), false);192assertEquals("abc".startsWith("bcde", -Infinity), false);193assertEquals("abc".startsWith("", -1), true);194assertEquals("abc".startsWith("\0", -1), false);195assertEquals("abc".startsWith("a", -1), true);196assertEquals("abc".startsWith("b", -1), false);197assertEquals("abc".startsWith("ab", -1), true);198assertEquals("abc".startsWith("bc", -1), false);199assertEquals("abc".startsWith("abc", -1), true);200assertEquals("abc".startsWith("bcd", -1), false);201assertEquals("abc".startsWith("abcd", -1), false);202assertEquals("abc".startsWith("bcde", -1), false);203assertEquals("abc".startsWith("", -0), true);204assertEquals("abc".startsWith("\0", -0), false);205assertEquals("abc".startsWith("a", -0), true);206assertEquals("abc".startsWith("b", -0), false);207assertEquals("abc".startsWith("ab", -0), true);208assertEquals("abc".startsWith("bc", -0), false);209assertEquals("abc".startsWith("abc", -0), true);210assertEquals("abc".startsWith("bcd", -0), false);211assertEquals("abc".startsWith("abcd", -0), false);212assertEquals("abc".startsWith("bcde", -0), false);213assertEquals("abc".startsWith("", +0), true);214assertEquals("abc".startsWith("\0", +0), false);215assertEquals("abc".startsWith("a", +0), true);216assertEquals("abc".startsWith("b", +0), false);217assertEquals("abc".startsWith("ab", +0), true);218assertEquals("abc".startsWith("bc", +0), false);219assertEquals("abc".startsWith("abc", +0), true);220assertEquals("abc".startsWith("bcd", +0), false);221assertEquals("abc".startsWith("abcd", +0), false);222assertEquals("abc".startsWith("bcde", +0), false);223assertEquals("abc".startsWith("", 1), true);224assertEquals("abc".startsWith("\0", 1), false);225assertEquals("abc".startsWith("a", 1), false);226assertEquals("abc".startsWith("b", 1), true);227assertEquals("abc".startsWith("ab", 1), false);228assertEquals("abc".startsWith("bc", 1), true);229assertEquals("abc".startsWith("abc", 1), false);230assertEquals("abc".startsWith("bcd", 1), false);231assertEquals("abc".startsWith("abcd", 1), false);232assertEquals("abc".startsWith("bcde", 1), false);233assertEquals("abc".startsWith("", +Infinity), true);234assertEquals("abc".startsWith("\0", +Infinity), false);235assertEquals("abc".startsWith("a", +Infinity), false);236assertEquals("abc".startsWith("b", +Infinity), false);237assertEquals("abc".startsWith("ab", +Infinity), false);238assertEquals("abc".startsWith("bc", +Infinity), false);239assertEquals("abc".startsWith("abc", +Infinity), false);240assertEquals("abc".startsWith("bcd", +Infinity), false);241assertEquals("abc".startsWith("abcd", +Infinity), false);242assertEquals("abc".startsWith("bcde", +Infinity), false);243assertEquals("abc".startsWith("", true), true);244assertEquals("abc".startsWith("\0", true), false);245assertEquals("abc".startsWith("a", true), false);246assertEquals("abc".startsWith("b", true), true);247assertEquals("abc".startsWith("ab", true), false);248assertEquals("abc".startsWith("bc", true), true);249assertEquals("abc".startsWith("abc", true), false);250assertEquals("abc".startsWith("bcd", true), false);251assertEquals("abc".startsWith("abcd", true), false);252assertEquals("abc".startsWith("bcde", true), false);253assertEquals("abc".startsWith("", "x"), true);254assertEquals("abc".startsWith("\0", "x"), false);255assertEquals("abc".startsWith("a", "x"), true);256assertEquals("abc".startsWith("b", "x"), false);257assertEquals("abc".startsWith("ab", "x"), true);258assertEquals("abc".startsWith("bc", "x"), false);259assertEquals("abc".startsWith("abc", "x"), true);260assertEquals("abc".startsWith("bcd", "x"), false);261assertEquals("abc".startsWith("abcd", "x"), false);262assertEquals("abc".startsWith("bcde", "x"), false);263assertEquals("[a-z]+(bar)?".startsWith("[a-z]+"), true);264assertThrows(function() { "[a-z]+(bar)?".startsWith(/[a-z]+/); }, TypeError);265assertEquals("[a-z]+(bar)?".startsWith("(bar)?", 6), true);266assertThrows(function() { "[a-z]+(bar)?".startsWith(/(bar)?/); }, TypeError);267assertThrows(function() { "[a-z]+/(bar)?/".startsWith(/(bar)?/); }, TypeError);268// http://mathiasbynens.be/notes/javascript-unicode#poo-test269var string = "I\xF1t\xEBrn\xE2ti\xF4n\xE0liz\xE6ti\xF8n\u2603\uD83D\uDCA9";270assertEquals(string.startsWith(""), true);271assertEquals(string.startsWith("\xF1t\xEBr"), false);272assertEquals(string.startsWith("\xF1t\xEBr", 1), true);273assertEquals(string.startsWith("\xE0liz\xE6"), false);274assertEquals(string.startsWith("\xE0liz\xE6", 11), true);275assertEquals(string.startsWith("\xF8n\u2603\uD83D\uDCA9"), false);276assertEquals(string.startsWith("\xF8n\u2603\uD83D\uDCA9", 18), true);277assertEquals(string.startsWith("\u2603"), false);278assertEquals(string.startsWith("\u2603", 20), true);279assertEquals(string.startsWith("\uD83D\uDCA9"), false);280assertEquals(string.startsWith("\uD83D\uDCA9", 21), true);281assertThrows(function() {282 String.prototype.startsWith.call(undefined);283}, TypeError);284assertThrows(function() {285 String.prototype.startsWith.call(undefined, "b");286}, TypeError);287assertThrows(function() {288 String.prototype.startsWith.call(undefined, "b", 4);289}, TypeError);290assertThrows(function() {291 String.prototype.startsWith.call(null);292}, TypeError);293assertThrows(function() {294 String.prototype.startsWith.call(null, "b");295}, TypeError);296assertThrows(function() {297 String.prototype.startsWith.call(null, "b", 4);298}, TypeError);299assertEquals(String.prototype.startsWith.call(42, "2"), false);300assertEquals(String.prototype.startsWith.call(42, "4"), true);301assertEquals(String.prototype.startsWith.call(42, "b", 4), false);302assertEquals(String.prototype.startsWith.call(42, "2", 1), true);303assertEquals(String.prototype.startsWith.call(42, "2", 4), false);304assertEquals(String.prototype.startsWith.call({305 "toString": function() { return "abc"; }306}, "b", 0), false);307assertEquals(String.prototype.startsWith.call({308 "toString": function() { return "abc"; }309}, "b", 1), true);310assertEquals(String.prototype.startsWith.call({311 "toString": function() { return "abc"; }312}, "b", 2), false);313assertThrows(function() {314 String.prototype.startsWith.call({315 "toString": function() { throw RangeError(); }316 }, /./);317}, RangeError);318assertThrows(function() {319 String.prototype.startsWith.call({320 "toString": function() { return "abc"; }321 }, /./);322}, TypeError);323assertThrows(function() {324 String.prototype.startsWith.apply(undefined);325}, TypeError);326assertThrows(function() {327 String.prototype.startsWith.apply(undefined, ["b"]);328}, TypeError);329assertThrows(function() {330 String.prototype.startsWith.apply(undefined, ["b", 4]);331}, TypeError);332assertThrows(function() {333 String.prototype.startsWith.apply(null);334}, TypeError);335assertThrows(function() {336 String.prototype.startsWith.apply(null, ["b"]);337}, TypeError);338assertThrows(function() {339 String.prototype.startsWith.apply(null, ["b", 4]);340}, TypeError);341assertEquals(String.prototype.startsWith.apply(42, ["2"]), false);342assertEquals(String.prototype.startsWith.apply(42, ["4"]), true);343assertEquals(String.prototype.startsWith.apply(42, ["b", 4]), false);344assertEquals(String.prototype.startsWith.apply(42, ["2", 1]), true);345assertEquals(String.prototype.startsWith.apply(42, ["2", 4]), false);346assertEquals(String.prototype.startsWith.apply({347 "toString": function() {348 return "abc";349 }350}, ["b", 0]), false);351assertEquals(String.prototype.startsWith.apply({352 "toString": function() {353 return "abc";354 }355}, ["b", 1]), true);356assertEquals(String.prototype.startsWith.apply({357 "toString": function() {358 return "abc";359 }360}, ["b", 2]), false);361assertThrows(function() {362 String.prototype.startsWith.apply({363 "toString": function() { throw RangeError(); }364 }, [/./]);365}, RangeError);366assertThrows(function() {367 String.prototype.startsWith.apply({368 "toString": function() { return "abc"; }369 }, [/./]);370}, TypeError);371// startsWith does its brand checks with Symbol.match372var re = /./;373assertThrows(function() {374 "".startsWith(re);375}, TypeError);376re[Symbol.match] = false;...
take_snapshot.py
Source:take_snapshot.py
...68 return False69 if ( '_jni' in file_path70 or 'jni_' in file_path71 or 'testdata/' in file_path72 or file_path.startswith('third_party/android_tools')73 or '/tests/' in file_path74 or ('/test/' in file_path and75 not '/webrtc/' in file_path and76 not file_path.startswith('net/test/') and77 not file_path.endswith('mock_chrome_application_mac.h') and78 not file_path.endswith('perftimer.h') and79 not 'ozone' in file_path)80 or file_path.endswith('.java')81 or file_path.startswith('android_webview')82 or file_path.startswith('apps/')83 or file_path.startswith('ash/')84 or file_path.startswith('athena')85 or file_path.startswith('base/android/java')86 or file_path.startswith('breakpad')87 or file_path.startswith('build/android/')88 or (file_path.startswith('chrome/') and89 not file_path.startswith('chrome/VERSION') and90 not '/app/theme/' in file_path and91 not '/app/resources/' in file_path and92 not '/browser/resources/' in file_path and93 not '/renderer/resources/' in file_path and94 not 'repack_locales' in file_path and95 not 'third_party/chromevox' in file_path and96 not 'media/desktop_media_list.h' in file_path and97 not 'media/desktop_streams_registry.' in file_path and98 not 'common/chrome_switches.' in file_path and99 not 'common/localized_error.' in file_path and100 not file_path.endswith('cf_resources.rc') and101 not file_path.endswith('version.py') and102 not file_path.endswith('.grd') and103 not file_path.endswith('.grdp') and104 not file_path.endswith('.json') and105 not file_path.endswith('chrome_version.rc.version'))106 or file_path.startswith('chrome_frame')107 or file_path.startswith('chromeos')108 or file_path.startswith('cloud_print')109 or (file_path.startswith('components') and110 not file_path.startswith('components/device_event_log') and111 not file_path.startswith('components/devtools_') and112 not file_path.startswith('components/error_page') and113 not file_path.startswith('components/mime_util') and114 not file_path.startswith('components/printing') and115 not file_path.startswith('components/resources') and116 not file_path.startswith('components/scheduler') and117 not file_path.startswith('components/strings') and118 not file_path.startswith('components/tracing') and119 not file_path.startswith('components/visitedlink') and120 not file_path.startswith('components/web_cache') and121 not file_path.startswith('components/webcrypto') and122 not file_path.endswith('.grdp') and123 not 'components_strings' in file_path)124 or file_path.startswith('content/public/android/java')125 or (file_path.startswith('content/shell') and126 not file_path.startswith('content/shell/common'))127 or file_path.startswith('courgette')128 or (file_path.startswith('extensions') and129 not 'browser/extension_function_registry.h' in file_path and130 not 'browser/extension_function_histogram_value.h' in file_path)131 or file_path.startswith('google_update')132 or file_path.startswith('ios')133 or file_path.startswith('media/base/android/java')134 or file_path.startswith('native_client')135 or file_path.startswith('net/android/java')136 or file_path.startswith('pdf')137 or file_path.startswith('remoting')138 or file_path.startswith('rlz')139 or file_path.startswith('sync')140 or file_path.startswith('testing/android')141 or file_path.startswith('testing/buildbot')142 or file_path.startswith('third_party/WebKit/LayoutTests')143 or file_path.startswith('third_party/WebKit/ManualTests')144 or file_path.startswith('third_party/WebKit/PerformanceTests')145 or file_path.startswith('third_party/accessibility-audit')146 or file_path.startswith('third_party/android_')147 or file_path.startswith('third_party/apache-win32')148 or file_path.startswith('third_party/apple_sample_code')149 or file_path.startswith('third_party/ashmem')150 or file_path.startswith('third_party/binutils')151 or file_path.startswith('third_party/bison')152 or (file_path.startswith('third_party/cacheinvalidation') and153 not file_path.endswith('isolate'))154 or file_path.startswith('third_party/chromite')155 or file_path.startswith('third_party/cld_2')156 or file_path.startswith('third_party/codesighs')157 or file_path.startswith('third_party/colorama')158 or file_path.startswith('third_party/cros_system_api')159 or file_path.startswith('third_party/cygwin')160 or file_path.startswith('third_party/cython')161 or file_path.startswith('third_party/deqp')162 or file_path.startswith('third_party/elfutils')163 or file_path.startswith('third_party/google_input_tools')164 or file_path.startswith('third_party/gperf')165 or file_path.startswith('third_party/gnu_binutils')166 or file_path.startswith('third_party/gtk+')167 or file_path.startswith('third_party/google_appengine_cloudstorage')168 or file_path.startswith('third_party/google_toolbox_for_mac')169 or file_path.startswith('third_party/hunspell_dictionaries')170 or file_path.startswith('third_party/hunspell')171 or file_path.startswith('third_party/instrumented_libraries')172 or file_path.startswith('third_party/jsr-305/src')173 or file_path.startswith('third_party/junit')174 or file_path.startswith('third_party/libphonenumber')175 or file_path.startswith('third_party/libaddressinput')176 or file_path.startswith('third_party/libc++')177 or file_path.startswith('third_party/libc++abi')178 or file_path.startswith('third_party/liblouis')179 or file_path.startswith('third_party/lighttpd')180 or file_path.startswith('third_party/markdown')181 or file_path.startswith('third_party/mingw-w64')182 or file_path.startswith('third_party/nacl_sdk_binaries')183 or (file_path.startswith('third_party/polymer') and184 not file_path.startswith('third_party/polymer/v1_0/components-chromium/'))185 or file_path.startswith('third_party/pdfsqueeze')186 or file_path.startswith('third_party/pefile')187 or file_path.startswith('third_party/perl')188 or file_path.startswith('third_party/pdfium')189 or file_path.startswith('third_party/psyco_win32')190 or file_path.startswith('third_party/scons-2.0.1')191 or file_path.startswith('third_party/trace-viewer')192 or file_path.startswith('third_party/undoview')193 or file_path.startswith('third_party/webgl')194 or (file_path.startswith('tools') and195 not file_path.startswith('tools/clang') and196 not file_path.startswith('tools/compile_test') and197 not file_path.startswith('tools/generate_library_loader') and198 not file_path.startswith('tools/generate_shim_headers') and199 not file_path.startswith('tools/generate_stubs') and200 not file_path.startswith('tools/grit') and201 not file_path.startswith('tools/gyp') and202 not file_path.startswith('tools/json_comment_eater') and203 not file_path.startswith('tools/json_schema_compiler') and204 not file_path.startswith('tools/idl_parser') and205 not file_path.startswith('tools/protoc_wrapper'))206 or file_path.startswith('ui/android/java')207 or file_path.startswith('ui/app_list')208 or file_path.startswith('ui/base/ime/chromeos')209 or file_path.startswith('ui/chromeos')210 or file_path.startswith('ui/display/chromeos')211 or file_path.startswith('ui/events/ozone/chromeos')212 or file_path.startswith('ui/file_manager')213 or file_path.startswith('ui/gfx/chromeos')214 ):215 return True216 return False217def printProgress(current, total):218 sys.stdout.write("\r{} of {}".format(current, total))219 sys.stdout.flush()220def copyFile(src, dst):221 src = os.path.abspath(src)222 dst = os.path.abspath(dst)223 dst_dir = os.path.dirname(dst)224 if not os.path.isdir(dst_dir):225 os.makedirs(dst_dir)226 if os.path.exists(dst):227 os.remove(dst)...
code_test.py
Source:code_test.py
1def get_category(dest):2 if dest.startswith("/s/") or dest.startswith("/download/resources"):3 return "static"4 if dest.startswith("images"):5 return "images"6 if dest.startswith("/projects/"):7 return "projects"8 if dest.startswith("/?") or dest == "/secure/" or dest.startswith(9 "/secure/default.jsp"):10 return 'Home'11 if dest.startswith("/default.jsp?clicked=footer") or (dest == ""):12 return 'Home'13 if dest.startswith("/secure/IssueNavigator.jspa") or dest.startswith(14 "/secure/IssueNavigator!"):15 return 'IssueNavigator'16 if dest.startswith("/issues/"):17 return 'Issues'18 if dest == "/i":19 return 'Issues'20 if dest.startswith("/secure/BrowseProjects.jspa"):21 return 'BrowseProjects'22 if dest.startswith("/secure/BrowseProject.jspa"):23 return 'BrowseProject'24 if dest == "/browse/" or dest == "/browse":25 return 'BrowseProject'26 if dest == "/includes/jira/issue/searchIssueTypes.js":27 return 'INCLUDES'28 if dest.startswith("/includes/blank.html?"):29 return 'INCLUDES'30 if dest == "/includes/deployJava.js":31 return 'INCLUDES'32 if dest.startswith("/includes/js"):33 return 'INCLUDES'34 if dest.startswith("/rpc/soap"):35 return 'RPC'36 if dest.startswith("/rpc/xmlrpc"):37 return 'RPC'38 if dest.startswith("/rpc/json-rpc"):39 return 'RPC'40 if dest.startswith("/secure/WikiRendererHelpAction.jspa"):41 return 'WikiRendererHelp'42 if dest.startswith("/secure/ViewUserHover!default.jspa"):43 return 'ViewUserHover'44 if dest.startswith("/secure/popups/UserPickerBrowser.jspa"):45 return 'UserPickerBrowser'46 if dest.startswith("/secure/UpdateUserPreferences.jspa") or dest.startswith(47 "/secure/UpdateUserPreferences!"):48 return 'UpdateUserPreferences'49 if dest.startswith("/secure/Dashboard.jspa") or dest.startswith(50 "Dashboard.jspa"):51 return 'Dashboard'52 if dest.startswith("/secure/ViewProfile.jspa"):53 return 'ViewProfile'54 if dest.startswith("/sr/jira.issueviews:searchrequest-xml/"):55 return 'SearchRequest_XML'56 if dest.startswith(57 "/sr/jira.issueviews:searchrequest-rss") or dest.startswith(58 "/sr/jira.issueviews%3Asearchrequest-rss"):59 return 'SearchRequest_RSS'60 if dest.startswith("/sr/jira.issueviews:searchrequest-comments-rss/"):61 return 'SearchRequest_RSS'62 if dest.startswith(63 "/sr/jira.issueviews:searchrequest-excel-current-fields"):64 return 'SearchRequest_Excel'65 if dest.startswith("/secure/CreateIssue.jspa") or dest.startswith(66 "/secure/CreateIssue!") or dest.startswith(67 "/secure/CreateIssueDetails!") or dest.startswith(68 "/secure/CreateIssueDetails.jspa") or dest.startswith(69 "/secure/CreateSubTaskIssueDetails.jspa") or dest.startswith(70 "/secure/CreateSubTaskIssue.jspa") or dest.startswith(71 "/secure/CreateSubTaskIssue!"):72 return 'CreateIssue'73 if dest.startswith("/secure/QuickCreateIssue!default.jspa"):74 return 'CreateIssue'75 if dest.startswith("/secure/ReleaseNote.jspa"):76 return 'ReleaseNote'77 if dest.startswith("/secure/QuickSearch.jspa"):78 return 'QuickSearch'79 if dest.startswith("/rest/activity-stream"):80 return 'REST_ACTIVITY_STREAM'81 if dest.startswith("/rest/greenhopper/1.0/xboard"):82 return 'REST_greenhopper_xboard'83 if dest.startswith("/rest/greenhopper/1.0/rapidview"):84 return 'REST_greenhopper_rapidview'85 if dest.startswith("/rest/greenhopper"):86 return 'REST_greenhopper'87 if dest.startswith("/rest/crm/"):88 return 'REST_CRM'89 if dest.startswith("/rest/myrestresource/"):90 return 'REST_myrestresource'91 if dest.startswith("/rest/whoslooking/"):92 return 'REST_whoslooking'93 if dest.startswith("/rest/dashboards/"):94 return 'REST_dashboards'95 if dest.startswith("/login.jsp") or dest.startswith("/loginsso.jsp"):96 return 'Login'97 if dest.startswith("/secure/Logout!") or dest.startswith("/logout"):98 return 'Logout'99 if dest.startswith("/secure/attachment/"):100 return 'ATTACHMENTS'101 if dest.startswith("/secure/attachmentzip/unzip/"):102 return 'ATTACHMENTS'103 if dest.startswith("/secure/ManageAttachments.jspa") or dest.startswith(104 "/secure/ManageAttachments!") or dest.startswith(105 "/secure/AttachFile"):106 return 'ATTACHMENTS'107 if dest.startswith("/secure/DeleteAttachment.jspa") or dest.startswith(108 "/secure/DeleteAttachment!") or dest.startswith(109 "/secure/AttachFile"):110 return 'ATTACHMENTS'111 if dest.startswith("/secure/AttachTemporaryFile.jspa"):112 return 'ATTACHMENTS'113 if dest.startswith("/plugins/servlet/streams"):114 return 'ACTIVITY_STREAMS'115 if dest.startswith("/activity?"):116 return 'ACTIVITY_STREAMS'117 if dest.startswith("/plugins/servlet/gadgets/"):118 return 'GADGETS'119 if dest.startswith("/rest/gadgets"):120 return 'GADGETS'121 if dest.startswith("/secure/RunPortlet.jspa"):122 return 'RunPortlet'123 if dest.startswith("/secure/useravatar"):124 return 'USER_AVATAR'125 if (dest == "/osd.jsp"):126 return 'OpenSearch'127 if dest.startswith("/secure/WorkflowUIDispatcher.jspa"):128 return 'WorkflowTransition'129 if dest.startswith("/secure/CommentAssignIssue!default.jspa") or \130 dest.startswith("/secure/CommentAssignIssue.jspa"):131 return 'WorkflowTransition'132 if dest.startswith("/secure/SaveAsFilter!") or dest.startswith(133 "/secure/SaveAsFilter.jspa"):134 return 'SaveAsFilter'135 if dest.startswith("/secure/ManageFilters!") or dest.startswith(136 "/secure/ManageFilters.jspa"):137 return 'ManageFilters'138 if dest.startswith("/secure/RapidBoard.jspa") or (139 dest == "/secure/GreenHopper.jspa"):140 return 'GreenHopper'141 if dest.startswith("/secure/EditAction"):142 return 'EditAction'143 if dest.startswith("/secure/ViewIssue.jspa"):144 return 'ViewIssue'145 if dest.startswith("/secure/AjaxIssueAction.jspa") or dest.startswith(146 "/secure/AjaxIssueAction!"):147 return 'AjaxIssueAction'148 if dest.startswith("/secure/AjaxIssueEditAction.jspa") or dest.startswith(149 "/secure/AjaxIssueEditAction!"):150 return 'AjaxIssueEditAction'151 if dest.startswith("/si/jira.issueviews:issue-xml/"):152 return 'IssueXml'153 if dest.startswith("/secure/EditIssue") or dest.startswith(154 "/secure/EditSubTaskIssue"):155 return 'EditIssue'156 if dest.startswith("/secure/DeleteIssue"):157 return 'DeleteIssue'158 if dest.startswith(159 "/secure/QuickEditIssue!default.jspa") or dest.startswith(160 "/secure/QuickEditIssue.jspa"):161 return 'EditIssue'162 if dest.startswith("/secure/MoveIssue"):163 return 'MoveIssue'164 if dest.startswith("/secure/AddComment.jspa") or dest.startswith(165 "/secure/AddComment!"):166 return 'AddComment'167 if dest.startswith("/secure/CreateWorklog.jspa") or dest.startswith(168 "/secure/CreateWorklog!"):169 return 'CreateWorklog'170 if dest.startswith("/secure/EditComment"):171 return 'EditComment'172 if dest.startswith("/secure/QuickCreateIssue"):173 return 'QuickCreateIssue'174 """ 175 if ((requestMethod == RequestMethod.GET) & & dest.startswith(176 "/secure/IssueAction!default.jspa"):177 return 'INLINE_EDIT_REFRESH'178 179 if ((requestMethod == RequestMethod.POST) & & dest.startswith(180 "/secure/IssueAction!default.jspa"):181 return 'INLINE_EDIT_POST'182 183 if ((requestMethod == RequestMethod.POST) & & dest.startswith(184 "/secure/IssueAction.jspa"):185 return 'INLINE_EDIT_POST'186 """187 if dest.startswith("/secure/views/bulkedit/"):188 return 'BulkOperation'189 if dest.startswith("/secure/EditLabels!") or dest.startswith(190 "/secure/EditLabels.jspa"):191 return 'EditLabels'192 if dest.startswith("/charts?filename="):193 return 'Charts'194 if dest.startswith("/secure/QueryComponent"):195 return 'QueryComponent'196 if dest.startswith("/secure/VoteOrWatchIssue.jspa"):197 return 'VoteOrWatchIssue'198 if dest.startswith("/secure/projectavatar"):199 return 'ProjectAvatar'200 if dest.startswith("/secure/AssignIssue"):201 return 'AssignIssue'202 if dest.startswith("/rest/gadget"):203 return 'REST_GADGET'204 if dest.startswith("/secure/RankTop.jspa") or dest.startswith(205 "/secure/RankBottom.jspa") or dest.startswith(206 "/secure/GHGoToBoard.jspa") or dest.startswith(207 "/secure/GHLocateIssueOnBoard.jspa") or dest.startswith(208 "/secure/GHLocateSprintOnBoard.jspa"):209 return 'GreenHopper'210 if dest.startswith("/secure/VersionBoard.jspa") or dest.startswith(211 "/secure/VersionBoard!"):212 return 'GreenHopper'213 if dest.startswith("/secure/TaskBoard.jspa") or dest.startswith(214 "/secure/TaskBoard!"):215 return 'GreenHopper'216 if dest.startswith("/secure/VBRefreshBoard.jspa") or dest.startswith(217 "/secure/VBRefreshBoard!"):218 return 'GreenHopper'219 if dest.startswith("/secure/VBRefreshBreadcrumbs.jspa") or dest.startswith(220 "/secure/VBRefreshBreadcrumbs!"):221 return 'GreenHopper'222 if dest.startswith("/secure/BoardOptions.jspa") or dest.startswith(223 "/secure/BoardOptions!"):224 return 'GreenHopper'225 if dest.startswith("/secure/SearchBoard.jspa") or dest.startswith(226 "/secure/SearchBoard!"):227 return 'GreenHopper'228 if dest.startswith("/secure/ChartBoard.jspa") or dest.startswith(229 "/secure/ChartBoard!"):230 return 'GreenHopper'231 if dest.startswith("/secure/GetBoardForIssue2.jspa") or dest.startswith(232 "/secure/GetBoardForIssue2!"):233 return 'GreenHopper'234 if dest.startswith("/secure/GHCreateNewIssue.jspa") or dest.startswith(235 "/secure/GHCreateNewIssue!"):236 return 'GreenHopper'237 if dest.startswith("/secure/GHAddIssue.jspa") or dest.startswith(238 "/secure/GHAddIssue!"):239 return 'GreenHopper'240 if dest.startswith("/secure/GreenHopperClassic.jspa") or dest.startswith(241 "/secure/GreenHopperClassic!"):242 return 'GreenHopper'243 if dest.startswith("/secure/RapidView.jspa") or dest.startswith(244 "/secure/RapidView!"):245 return 'GreenHopper'246 if dest.startswith("/secure/ManageRapidViews.jspa") or dest.startswith(247 "/secure/ManageRapidViews!"):248 return 'GreenHopper'249 if dest.startswith("/secure/MyJiraHome.jspa"):250 return 'MyJiraHome'251 if dest.startswith("/secure/thumbnail"):252 return 'Thumbnail'253 if dest.startswith("/plugins/servlet"):254 return 'PLUGINS_SERVLET'255 if dest.startswith("/secure/LinkJiraIssue.jspa") or dest.startswith(256 "/secure/LinkJiraIssue!"):257 return 'LinkJiraIssue'258 if dest.startswith("/download/resources/"):259 return 'PLUGIN_RESOURCES'260 if dest.startswith("/lazyLoader"):261 return 'LazyPortletLoader'262 if dest.startswith("/dwr/"):263 return 'DWR'264 if dest.startswith("/s/"):265 return 'STATIC_RESOURCE'266 if dest.startswith("/images/"):267 return 'STATIC_RESOURCE'268 if dest == "/styles/combined.css" or dest == "/styles/global.css":269 return 'STATIC_RESOURCE'270 if dest == "/favicon.ico" or dest == "/robots.txt":271 return 'STATIC_RESOURCE'272 if dest.startswith("/images/throbber/") or dest.startswith(273 "/download/batch/com.atlassian.upm.atlassian-universal-plugin"274 "-manager"275 "-plugin:upgrade-notification/com.atlassian.upm.atlassian-universal"276 "-plugin-manager-plugin:upgrade-notification.js"):277 return 'STATIC_RESOURCE'278 if dest.startswith("/secure/project/"):279 return 'ProjectAdmin'280 if dest.startswith("/secure/admin") or dest.startswith(281 "/secure/AdminSummary.jspa"):282 return 'ADMIN'283 if dest.startswith("/secure/SetSelectedIssue.jspa"):284 return 'SetSelectedIssue'285 if dest.startswith("/rest/collectors/"):286 return 'REST_COLLECTORS'287 if dest.startswith("/rest/analytics/"):288 return 'REST_ANALYTICS'289 if dest.startswith("/rest/capabilities"):290 return 'REST_CAPABILITIES'291 if dest.startswith("/rest/menu/"):292 return 'REST_MENU'293 if dest.startswith("/rest/nav-links-analytics-data/"):294 return 'REST_NAV_LINKS_ANALYTICS_DATA'295 if dest.startswith("/rest/mobile/"):296 return 'REST_MOBILE'297 if dest.startswith("/rest/issueNav/"):298 return 'REST_ISSUE_NAV'299 if dest.startswith("/rest/helptips/"):300 return 'REST_HELP_TIPS'301 if dest.startswith("/rest/viewIssue/"):302 return 'REST_HELP_TIPS'303 if dest.startswith("/rest/lasso/"):304 return 'REST_LASSO'305 if dest.startswith("/rest/api/2/search"):306 return 'REST_API_SEARCH'307 if dest.startswith("/rest/api/2/filter/"):308 return 'REST_API_FILTER'309 if dest.startswith("/rest/api/1.0/shortcuts"):310 return 'REST_API_SHORTCUTS'311 if dest.startswith("/rest/api/"):312 return 'REST_API'313 if dest.startswith("/rest/scriptrunner/"):314 return 'REST_scriptrunner'315 if dest.startswith("/rest/scriptrunner-jira/"):316 return 'REST_scriptrunner'317 if dest.startswith("/rest/remote-link-aggregation/"):318 return 'REST_remote_link_aggregation'319 if dest.startswith("/rest/com.onresolve.jira.plugin.Behaviours/"):320 return 'REST_onresolveBehaviours'321 if dest.startswith("/rest/jeditortemplateresource/"):322 return 'REST_jeditortemplateresource'323 if dest.startswith("/rest/bamboo/"):324 return 'REST_bamboo'325 if dest.startswith("/rest/"):326 return 'REST_OTHER'327 if dest.startswith("/secure/errors.jsp"):328 return 'Errors_jsp'329 if dest.startswith("/TempoIssuePanel!default.jspa"):330 return 'TempoIssuePanel'331 if dest.startswith("/secure/Tempo") or dest.startswith("/Tempo"):...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!